
Dear Stefano Babic,
In message 4CD035F7.9070609@denx.de you wrote:
And then the calculation depends only on the current setting - which is _not_ board dependent.
Yes, calculation is not board dependent and must remain in lcd_setmem(). What I meant as "board dependent" is really the LCD settings, in terms of display resolution and bits x pixel. The proposed wek function can set the panel_info structure, that lcd_setmem() uses for computation.
Why do we need a board dependent function for that? We can adjust the setings by storing their value in an environment variable, say some- thing like 800x600x16@60Hz or copying what Linux does with the "video- mode=" boot argument (we already have drivers/video/videomodes.c). That should be precise enough, and is completely bosrd-independent.
Boards would start with a (board dependent) default setting, though.
Yes. What we need is a way to get the board default setting to allow lcd_setmem() to compute the required memory.
Let's re-use existing interfaces (especially if we then can pass the very same variable as boot argument to Linux).
Best regards,
Wolfgang Denk