[U-Boot] [PATCH 4/4] common/lcd_console: introduce display/framebuffer rotation

Nikita Kiryanov nikita at compulab.co.il
Mon Mar 16 17:48:45 CET 2015


On 03/16/2015 01:35 PM, Igor Grinberg wrote:
> On 03/16/15 10:32, Hannes Petermaier wrote:
>>
>> 2)
>> I need in almost every "paint-function" the framebuffer base
>> (cons.lcd_address) and the screen dimension.
>> This information is stored in the static structure within lcd.c - i don't
>> like to make this public.
>> A possible solution could be to change all painting function to work
>> without some global variable and pass
>> a third argument, pointer to console_t, and take informations from there.
>> This will consume one more register
>> on function call, runtime is equal i think.
>>
>> Whats your opinion around this ?
>
> Well, since Nikita is working on refactoring the lcd.c stuff and
> already examined several aproaches, I think he can provide a better
> opinion on this.
> Nikita?

I think that passing a pointer to console_t is the way to go. You have an
object oriented design here, and that's the object oriented way of accessing
the object's members from its methods.

-- 
Regards,
Nikita Kiryanov


More information about the U-Boot mailing list