[U-Boot] [RESEND] video: bcm2835: add support for reading from the video-mode environment variable

Brian Masney masneyb at onstation.org
Thu Jan 12 19:32:15 CET 2017


On Thu, Jan 12, 2017 at 11:02:14AM -0700, Stephen Warren wrote:
> On 01/12/2017 01:57 AM, Brian Masney wrote:
> > The bcm2835 driver polls the monitor and selects the highest resolution
> > that is available. This patch allows optionally setting the video-mode
> > environment variable so that a different video resolution can be used.
> > If the environment variable is not specified, then it will fall back to
> > using the old behavior of using the maximum allowable resolution.
> > 
> > This patch is needed to fix an issue booting an upstream Linux kernel
> > on a Raspberry Pi 2 with a Pi Top screen. Previously, the bcm2835 would
> > select the 1366x768 resolution (which is a supported resolution),
> > however the screen would be unreadable. (See
> > https://www.flickr.com/photos/masneyb/30942037416/ for picture). Using
> > this patch, the resolution 1024x768 can be selected and is readable on
> > the screen.
> 
> Doesn't this mean that the RPi firmware is reporting the wrong resolution?
> If so, isn't the correct fix to get an updated firmware that reports the
> correct resolution, rather than patching each piece of SW to ignore the
> FW-reported resolution? Or, if this is caused by incorrect EDID in the Pi
> Top, then fix the EDID EEPROM on that.
> 
> Perhaps there are other use-cases for using a non-default resolution, but to
> support that, you'd need to make a call into the FW to request and configure
> that non-default resolution, not just ignore what resolution the FW
> programmed.

Hi Stephen,
   The Pi Top screen works correctly with the 1366x768 resolution when
booting the 4.4 kernel provided by the Raspberry Pi foundation in
stock Raspbian (no u-boot). (There are no outside provided drivers from
Pi Top.) When booting with u-boot, I can't use the 1366x768 resolution,
even when setting the resolution manually using my patch. When auto
detection is in place, u-boot correctly detects the 1366x768 resolution
according to debugging messages that I see on the serial console.
1024x768 is the highest resolution that I can get a working display with
the Pi Top and u-boot. I also tried changing the display depth.

   I tried booting u-boot using the latest Raspberry Pi firmware and the
older firmware provided with the Raspbian 4.4 kernel. In both cases, the
screen correctly displays the rainbow square at the top left when the
GPU is booting, but then the screen becomes garbled when it gets to
u-boot and the bcm2835 code sets the resolution.

   I tried going through the Pi Top vendor for help but didn't get very
far with them. I'm open to other suggestions to try.

Thanks,

Brian



More information about the U-Boot mailing list