From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Mon, 16 Mar 2015 18:48:45 +0200 Subject: [U-Boot] [PATCH 4/4] common/lcd_console: introduce display/framebuffer rotation In-Reply-To: <5506C000.50302@compulab.co.il> References: <1426078645-4901-1-git-send-email-oe5hpm@oevsv.at> <1426078645-4901-5-git-send-email-oe5hpm@oevsv.at> <550185DF.2090506@compulab.co.il> <5501C2D7.20107@petermaier.org> <55054422.6030506@compulab.co.il> <5506C000.50302@compulab.co.il> Message-ID: <5507096D.7030702@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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