Skip to content
Snippets Groups Projects
Commit 6d330719 authored by Stephen Warren's avatar Stephen Warren Committed by Albert ARIBAUD
Browse files

lcd: calculate line_length after lcd_ctrl_init()


When an LCD driver is actually driving a regular external display, e.g.
an HDMI monitor, the display resolution might not be known until the
display controller has initialized, i.e. during lcd_ctrl_init(). However,
lcd.c calculates lcd_line_length before calling this function, thus
relying on a hard-coded resolution in struct panel_info.

Instead, defer this calculation until after lcd_ctrl_init() has had the
chance to dynamically determine the resolution. This needs to happen
before lcd_clear(), since the value is used there.

grep indicates that no code outside lcd.c uses this lcd_line_length; in
particular, no lcd_ctrl_init() implementations read it.

Signed-off-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Acked-by: default avatarAnatolij Gustschin <agust@denx.de>
parent 3f397782
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment