linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilia Mirkin <imirkin@alum.mit.edu>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Pekka Paalanen" <ppaalanen@gmail.com>,
	"Emil Velikov" <emil.l.velikov@gmail.com>,
	"ML dri-devel" <dri-devel@lists.freedesktop.org>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"David Airlie" <airlied@linux.ie>,
	"Michel Dänzer" <michel@daenzer.net>,
	"open list" <linux-kernel@vger.kernel.org>,
	"amd-gfx mailing list" <amd-gfx@lists.freedesktop.org>,
	"Sean Paul" <seanpaul@chromium.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Alex Deucher" <alexdeucher@gmail.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>
Subject: Re: [PATCH 1/3] drm: fourcc byteorder: drop DRM_FORMAT_BIG_ENDIAN
Date: Tue, 2 May 2017 13:57:26 -0400	[thread overview]
Message-ID: <CAKb7UviZTYRrCE91Npwfg11wsuwpNk9w7kHV5bF27HPcnY5bbQ@mail.gmail.com> (raw)
In-Reply-To: <1493737591.8581.126.camel@redhat.com>

On Tue, May 2, 2017 at 11:06 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Radeon and nvidia (nv40) cards where mentioned.  I'll try to summarize
> (feel free to correct me if I'm wrong).
>
> nvidia has support for 8 bit-per-color formats only on bigendian hosts.
> Not sure whenever this is a driver or hardware limitation.

Let me just summarize the NVIDIA situation. First off, pre-nv50 and
nv50+ are entirely different and unrelated beasts.

The (pre-nv50) hardware has (a few) "big endian mode" bits. Those bits
are kind of unrelated to each other and control their own "domains".
One of the domains is reading of the scanout fb. So as a result, the
hardware can scan out XRGB8888, RGB565, and XRGB1555 stored in either
little or big endian packings, irrespective of the "mode" that other
parts of the hardware are in.

However there's the delicate little question of the GPU *generating*
the data. These older GPUs don't have quite the format flexibility
offered by newer hw. So only XRGB8888 is supported, packed in whatever
"mode" the whole PGRAPH unit is in. (I say this because things seem to
work when rendering using the XRGB8888 format while scanning out with
the BE flag set.)

There are no APIs for controlling the endianness of each engine in
nouveau, so it ends up being in "big endian" mode on BE hosts, so the
GPU can only render to big-endian-packed framebuffers.

None of this applies to nv50+ hw. (Although it might in broad strokes.)

Currently the driver is exposing XRGB8888 and ARGB8888 formats as
that's what drm_crtc_init does for it. However the ARGB8888 format
doesn't work (and shouldn't be exposed, the alpha is meaningless on a
single-plane setup), and the XRGB8888 format is assumed to be packed
in cpu host endian (and the "BE" bit is set accordingly).

Hope this helps!

  -ilia

  reply	other threads:[~2017-05-02 17:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170502133404.15354-1-kraxel@redhat.com>
2017-05-02 13:34 ` [PATCH 1/3] drm: fourcc byteorder: drop DRM_FORMAT_BIG_ENDIAN Gerd Hoffmann
2017-05-02 13:53   ` Emil Velikov
2017-05-02 14:14     ` Gerd Hoffmann
2017-05-02 14:27     ` Pekka Paalanen
2017-05-02 15:06       ` Gerd Hoffmann
2017-05-02 17:57         ` Ilia Mirkin [this message]
2017-05-03  3:05         ` Michel Dänzer
2017-05-03  9:24           ` Gerd Hoffmann
2017-05-08  0:38             ` Michel Dänzer
2017-05-02 13:34 ` [PATCH 2/3] drm: fourcc byteorder: add DRM_FORMAT_CPU_* Gerd Hoffmann
2017-05-02 13:34 ` [PATCH 3/3] drm: fourcc byteorder: add drm_mode_legacy_fb_format_he Gerd Hoffmann

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=CAKb7UviZTYRrCE91Npwfg11wsuwpNk9w7kHV5bF27HPcnY5bbQ@mail.gmail.com \
    --to=imirkin@alum.mit.edu \
    --cc=airlied@linux.ie \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel@daenzer.net \
    --cc=ppaalanen@gmail.com \
    --cc=seanpaul@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).