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 <[email protected]>
---
 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

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to