[U-Boot] [PATCH 2/2] video: bcm2835: fix various output modes

Andre Heider a.heider at gmail.com
Tue Oct 22 22:27:21 CEST 2013


Depending on the firmware's video options [1] the active SDTV or
HDTV mode can yield a framebuffer with noncontiguous horizontal lines,
giving a messed up display, for both, u-boot and the loaded kernel.

To always archive the required contiguousness for the used 16bpp, round
the framebuffer width down so its aligned to a width of 16.

[1] http://elinux.org/RPiconfig#Video_mode_options

Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 drivers/video/bcm2835.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index 58a6163..1404340 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -52,7 +52,7 @@ void lcd_ctrl_init(void *lcdbase)
 		return;
 	}
 
-	w = msg_query->physical_w_h.body.resp.width;
+	w = ROUND(msg_query->physical_w_h.body.resp.width, 16);
 	h = msg_query->physical_w_h.body.resp.height;
 
 	debug("bcm2835: Setting up display for %d x %d\n", w, h);
-- 
1.8.3.2



More information about the U-Boot mailing list