dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: dri-devel@lists.freedesktop.org
Subject: Re: My penguin has blue feets (aka: RGB versus BGR troubles)
Date: Sat, 27 Jul 2019 11:56:24 +0200	[thread overview]
Message-ID: <20190727095624.GA25081@ravnborg.org> (raw)
In-Reply-To: <20190726203626.GA31474@ravnborg.org>

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2019-07-27  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26 20:36 My penguin has blue feets (aka: RGB versus BGR troubles) Sam Ravnborg
2019-07-26 20:44 ` [RFC PATCH] drm: add Atmel LCDC display controller support Sam Ravnborg
2019-07-26 21:35 ` My penguin has blue feets (aka: RGB versus BGR troubles) Ilia Mirkin
2019-07-26 22:22   ` Daniel Vetter
2019-07-27 10:12     ` Sam Ravnborg
2019-07-27 10:50       ` Sam Ravnborg
2019-07-27  9:56 ` Sam Ravnborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190727095624.GA25081@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox