public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 2/2] video: bcm2835: fix various output modes
@ 2013-10-22 20:27 Andre Heider
  2013-10-23 16:57 ` Stephen Warren
  2013-10-24 18:00 ` [U-Boot] [PATCH v2 2/2] video: bcm2835: respect the pitch value Andre Heider
  0 siblings, 2 replies; 15+ messages in thread
From: Andre Heider @ 2013-10-22 20:27 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-11-12  8:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22 20:27 [U-Boot] [PATCH 2/2] video: bcm2835: fix various output modes Andre Heider
2013-10-23 16:57 ` Stephen Warren
2013-10-23 20:06   ` Andre Heider
2013-10-24 18:14   ` Andre Heider
2013-10-24 22:08     ` Stephen Warren
2013-10-24 18:00 ` [U-Boot] [PATCH v2 2/2] video: bcm2835: respect the pitch value Andre Heider
2013-10-24 22:13   ` Stephen Warren
2013-11-07 23:04   ` Anatolij Gustschin
2013-11-09 10:00   ` [U-Boot] [PATCH] lcd: allow overriding lcd_get_size() Anatolij Gustschin
2013-11-12  8:44     ` Anatolij Gustschin
2013-11-09 10:07   ` [U-Boot] [PATCH v3 2/2] video: bcm2835: respect the pitch value Anatolij Gustschin
2013-11-09 12:25     ` Andre Heider
2013-11-12  8:39       ` Anatolij Gustschin
2013-11-11 16:45     ` Stephen Warren
2013-11-12  8:48     ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox