From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Heider Date: Tue, 22 Oct 2013 22:27:21 +0200 Subject: [U-Boot] [PATCH 2/2] video: bcm2835: fix various output modes Message-ID: <1382473641-20614-2-git-send-email-a.heider@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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