dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: My penguin has blue feets (aka: RGB versus BGR troubles)
Date: Sat, 27 Jul 2019 12:12:18 +0200	[thread overview]
Message-ID: <20190727101218.GB25081@ravnborg.org> (raw)
In-Reply-To: <CAKMK7uEVaFeWwGQcvkZ9m2Q0DKzKmKTgkfmVZoKgt9iTR3dOMQ@mail.gmail.com>

Hi Daniel.

> > >
> > > *Any* hints why modetest fails when my driver reports the correct formats?
> >
> > Every driver to date supports XR24. So modetest uses that by default.
> > But this fails with your driver since it's an unsupported format.
> > Something like:
> >
> > modetest -M atmel-lcdc -s 34:800x480-60Hz@XB24
> >
> > should do the trick. The quirk covers drivers that use AddFB().
> > However modetest is fancy and uses AddFB2, which takes an explicit
> > format.
> 
> Yeah I thinki for fbdev the correct fix is to look whether the driver
> enabled atomic and if so, consult the fourcc format list of the
> primary plane of the first crtc to figure out what you might actually
> have set. Without atomic you can't realy on the format list being
> correct since for drivers who get the default primary plane that
> drm_crtc_init sets up the format list is garbage.

I do not follow you here.

# modetest -M atmel-lcdc -p
Planes:
id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
31      32      35      0,0             0,0     0               0x00000001
  formats: XB24 BG24 BG16

# modetest -M atmel-lcdc -a -p
Planes:
id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
31      32      35      0,0             0,0     0               0x00000001
  formats: XB24 BG24 BG16

So with or without atomic (-a option) the driver reports the same formats.


# modetest -M atmel-lcdc -a -s ...

does not work btw. It just exists without anything shown on the panel.


> Reworking the entire
> fbdev emulation to use fourcc codes would be even more awesome I
> guess.
To take the bait I would need a little bit more guidiance on this.

Is it something like:
- New variant af drm_fbdev_generic_setup() that takes a fourcc code, not
  a preferred_bpp
- drm_fb_helper_initial_config likewise
- drm_fb_helper_fbdev_setup likewise
- drm_fb_helper_single_fb_probe likewise

And then work through all the code until we no longer rely on
preferred_bpp??

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-07-27 10:12 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 [this message]
2019-07-27 10:50       ` Sam Ravnborg
2019-07-27  9:56 ` Sam Ravnborg

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=20190727101218.GB25081@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=daniel@ffwll.ch \
    --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