From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: How to map depth=30 fb to XBGR instead of XRGB?
Date: Tue, 9 Jan 2018 17:11:30 +0100 [thread overview]
Message-ID: <20180109161130.GC26573@phenom.ffwll.local> (raw)
In-Reply-To: <20180109151906.GT10981@intel.com>
On Tue, Jan 09, 2018 at 05:19:06PM +0200, Ville Syrjälä wrote:
> On Sun, Dec 31, 2017 at 01:03:39AM -0500, Ilia Mirkin wrote:
> > NVIDIA hardware, prior to Kepler, only supports XBGR2101010. However
> > drmAddFB with depth = 30 will use the mapping in
> > drm_mode_legacy_fb_format and pick the XRGB version of the format.
> >
> > One solution is to tell userspace "stop using addfb, move to addfb2".
> > However I'm hoping that there's some sort of semi-clean way of dealing
> > with such driver eccentricities without resorting to changing
> > userspace.
> >
> > Can the ioctl be handled in the driver perhaps? Or would it be
> > reasonable to add a callback in drm_driver?
>
> I don't think there's any sane way to allow the driver to remap these.
> How would generic userspace know which component order the driver
> actually picked?
By using addfb2. That seems the only option, and it'll likely result in a
bunch more "nouveau is crap" forum posts when people try to use 30bpp
with generic userspace on nouveau. Best we can do is drop a info_once
message into dmesg that userspace should consider using addfb2.
Ilia said he's ok with more "nouveau is crap", and that's about the only
option we have any.
Wrt implementation: A flag in drm_mode_config that overwrites the choice
in drm_addfb_ioctl (so that we can avoid going through all the drivers),
plus the same hack in the fbdev probe callback in nouveau is probably the
least invasive. Core one with a very huge comment ofc.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2018-01-09 16:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-31 6:03 How to map depth=30 fb to XBGR instead of XRGB? Ilia Mirkin
2018-01-09 15:19 ` Ville Syrjälä
2018-01-09 15:28 ` Chris Wilson
2018-01-09 16:12 ` Daniel Vetter
2018-01-09 16:11 ` Daniel Vetter [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=20180109161130.GC26573@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.