From: Lothar Waßmann Date: Mon, 18 Apr 2016 07:33:43 +0000 (+0200) Subject: karo: tx6: set LCD x, y dimensions to 0 when disabling LCD X-Git-Tag: KARO-TX6-2016-04-26~11 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=21d5e83b40368995383d1ff3b1cbdc5d61614a10;hp=0db69c20c2e42945cb1e91729fa46111a86b4a9b karo: tx6: set LCD x, y dimensions to 0 when disabling LCD Even when the LCD is disabled, the LCD framework will still clear the video memory. This can take a cosiderable amount of time for the maximum resolution of 16MiB that the i.MX6 supports. Setting vl_row and vl_col to 0 results in a zero sized framebuffer to avoid this unnecessary delay. --- diff --git a/board/karo/tx6/tx6qdl.c b/board/karo/tx6/tx6qdl.c index a232461e07..5a0e2a8193 100644 --- a/board/karo/tx6/tx6qdl.c +++ b/board/karo/tx6/tx6qdl.c @@ -1091,6 +1091,7 @@ void lcd_ctrl_init(void *lcdbase) if (!lcd_enabled) { debug("LCD disabled\n"); + goto disable; return; } @@ -1098,6 +1099,7 @@ void lcd_ctrl_init(void *lcdbase) debug("Disabling LCD\n"); lcd_enabled = 0; setenv("splashimage", NULL); + goto disable; return; } @@ -1107,6 +1109,7 @@ void lcd_ctrl_init(void *lcdbase) if (video_mode == NULL) { debug("Disabling LCD\n"); lcd_enabled = 0; + goto disable; return; } vm = video_mode; @@ -1120,6 +1123,7 @@ void lcd_ctrl_init(void *lcdbase) fb_mode.xres, fb_mode.yres, panel_info.vl_col, panel_info.vl_row); lcd_enabled = 0; + goto disable; return; } } @@ -1211,12 +1215,14 @@ void lcd_ctrl_init(void *lcdbase) printf(" %s", p->name); } printf("\n"); + goto disable; return; } if (p->xres > panel_info.vl_col || p->yres > panel_info.vl_row) { printf("video resolution: %dx%d exceeds hardware limits: %dx%d\n", p->xres, p->yres, panel_info.vl_col, panel_info.vl_row); lcd_enabled = 0; + goto disable; return; } panel_info.vl_col = p->xres; @@ -1275,6 +1281,7 @@ void lcd_ctrl_init(void *lcdbase) lcd_enabled = 0; printf("Invalid %s bus width: %d\n", is_lvds() ? "LVDS" : "LCD", lcd_bus_width); + goto disable; return; } if (is_lvds()) { @@ -1286,6 +1293,7 @@ void lcd_ctrl_init(void *lcdbase) if (lvds_chan_mask == 0) { printf("No LVDS channel active\n"); lcd_enabled = 0; + goto disable; return; } @@ -1315,6 +1323,13 @@ void lcd_ctrl_init(void *lcdbase) } else { debug("Skipping initialization of LCD controller\n"); } + return; + +disable: + lcd_enabled = 0; + panel_info.vl_col = 0; + panel_info.vl_row = 0; + } #else #define lcd_enabled 0