Hi all. Thanks for the responses. It turns out this was a PICNIC error (Problem In Chair, Not In Computer) On Fri, Jul 26, 2019 at 10:36:26PM +0200, Sam Ravnborg wrote: > Hi all. > > The Atmel at91sam9263 has a nice LCDC IP core that supports several > formats: > DRM_FORMAT_XBGR8888, DRM_FORMAT_BGR888, DRM_FORMAT_BGR565 > > (It also supports a palletized C8 format, but thats for later). > > The formats are all BGR formats - and some boards actually reverse Blue > and Red when wiring up the display. I have added a DT property to > identify boards with this difference. > > The penguin shown during boot of the kernel had blue feet which is a > clear sign that RED and GREEN was reversed. > > So to fix this I (got help from imirkin on irc) I implmented a quirk. > See patch below. > > With the quirk enabled I see: > - penguin shown during kernel boot has yellow feets (OK) > - modetest tell the driver reports: XB24 BG24 BG16 (as expected) > - modetest -s fails with: > # modetest -M atmel-lcdc -s 34:800x480-60Hz modetest do not like the "Hz" prefix when specifying the refresh rate. When Hz is added it reverts back to XR24. So when I use: # modetest -M atmel-lcdc -s 34:800x480@BG24 Then I see the expected output with the right colors. I also had got the false impression that if no format was specified modetest would use the first format reported from the driver. This was obviously also wrong. So all-in-all - I am quite happy with how things works now. Needs to do more testing, polishing a few patches and then I can send out a v3 of this driver. Sam _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel