From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 24 Oct 2013 23:13:34 +0100 Subject: [U-Boot] [PATCH v2 2/2] video: bcm2835: respect the pitch value In-Reply-To: <1382637641-1919-1-git-send-email-a.heider@gmail.com> References: <1382473641-20614-2-git-send-email-a.heider@gmail.com> <1382637641-1919-1-git-send-email-a.heider@gmail.com> Message-ID: <52699B8E.1030504@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/24/2013 07:00 PM, Andre Heider wrote: > 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. > > Fix this by setting lcd_line_length to the pitch value of the configured > framebuffer. This sounds like the right concept. > diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c > void lcd_enable(void) > { > + if (bcm2835_pitch) Why make this conditional? Does the firmware sometimes not return the correct pitch and/or does lcd_enable() get called before lcd_ctrl_init() so the global hasn't been set up? Either of those seem like nasty bugs that should be fixed... > + lcd_line_length = bcm2835_pitch; Why set lcd_line_length at a different time than the mailbox message is executed? Can't lcd_line_length be set at the end of lcd_ctrl_init(), thus avoiding the global variable bcm2835_pitch? > }