Patchwork [U-Boot,1/3] video: tegra: Update line length to match resolution

login
register
mail settings
Submitter Thierry Reding
Date Nov. 23, 2012, 10:58 a.m.
Message ID <1353668331-7667-1-git-send-email-thierry.reding@avionic-design.de>
Download mbox | patch
Permalink /patch/201289/
State Accepted
Delegated to: Tom Warren
Headers show

Comments

Thierry Reding - Nov. 23, 2012, 10:58 a.m.
Instead of storing the computed line length in a local variable, store
it in the global lcd_line_length variable to make sure the LCD subsystem
can properly draw content for the display resolution.

This probably wasn't noticed yet because the only board where LCD
support is currently enabled is Seaboard, which runs at a 1366x768
resolution. As it happens this is the maximum resolution supported and
also the default that is used to initialize the framebuffer before the
configuration from DT is available.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
 drivers/video/tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Simon Glass - Nov. 28, 2012, 8:47 p.m.
On Fri, Nov 23, 2012 at 2:58 AM, Thierry Reding
<thierry.reding@avionic-design.de> wrote:
> Instead of storing the computed line length in a local variable, store
> it in the global lcd_line_length variable to make sure the LCD subsystem
> can properly draw content for the display resolution.
>
> This probably wasn't noticed yet because the only board where LCD
> support is currently enabled is Seaboard, which runs at a 1366x768
> resolution. As it happens this is the maximum resolution supported and
> also the default that is used to initialize the framebuffer before the
> configuration from DT is available.
>
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>

Thanks!

Acked-by: Simon Glass <sjg@chromium.org>

Patch

diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 750a283..afcb008 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -145,8 +145,8 @@  static void update_panel_size(struct fdt_disp_config *config)
 
 void lcd_ctrl_init(void *lcdbase)
 {
-	int line_length, size;
 	int type = DCACHE_OFF;
+	int size;
 
 	assert(disp_config);
 
@@ -160,7 +160,7 @@  void lcd_ctrl_init(void *lcdbase)
 			&& disp_config->height <= LCD_MAX_HEIGHT
 			&& disp_config->log2_bpp <= LCD_MAX_LOG2_BPP)
 		update_panel_size(disp_config);
-	size = lcd_get_size(&line_length);
+	size = lcd_get_size(&lcd_line_length);
 
 	/* Set up the LCD caching as requested */
 	if (config.cache_type & FDT_LCD_CACHE_WRITE_THROUGH)