From: "Michel Dänzer" <michel@daenzer.net>
To: Gerd Hoffmann <kraxel@redhat.com>, Pekka Paalanen <ppaalanen@gmail.com>
Cc: amd-gfx mailing list <amd-gfx@lists.freedesktop.org>,
Emil Velikov <emil.l.velikov@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
ML dri-devel <dri-devel@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 1/3] drm: fourcc byteorder: drop DRM_FORMAT_BIG_ENDIAN
Date: Wed, 3 May 2017 12:05:00 +0900 [thread overview]
Message-ID: <28424bad-95c8-7394-4742-cd258fd71032@daenzer.net> (raw)
In-Reply-To: <1493737591.8581.126.camel@redhat.com>
On 03/05/17 12:06 AM, Gerd Hoffmann wrote:
>
>> Removing the definition also removes the possibility to describe a lot
>> of pixel formats, so that should definitely be mentioned. I think it
>> would also be good to have some kind of justified claim that no
>> hardware actually needs the pixel formats this is removing (e.g. RGB565
>> BE).
>
> That and RGB2101010 BE are the only candidates I can think of.
>
> Dealing with those in none-native byteorder is a PITA though. Display
> hardware is little endian (pci byte order) for quite a while already.
Maybe by default, but not exclusively.
> radeon looks differently on pre-R600 and R600+ hardware.
>
> pre-R600 can byteswap on cpu access, so the cpu view is bigendian
> whereas things are actually stored on little endian byte order.
> Hardware supports both 16bit and 32bit swaps. Used for fbdev emulation
> (probably 32bit swaps, but not fully sure).
32-bit swaps for 32 bpp, 16-bit swaps for 16 bpp.
> R600+ supports bigendian framebuffer formats, so no byteswapping on
> access is needed. Not sure whenever that includes 16bpp formats or
> whenever this is limited to the 8 bit-per-color formats [...]
It includes 16bpp. Looking at
drivers/gpu/drm/radeon/atombios_crtc.c:dce4_crtc_do_set_base(), it sets
up byte-swapping for all multi-byte formats, so it effectively treats
all those formats as if they had DRM_FORMAT_BIG_ENDIAN set.
If the radeon (and amdgpu) driver were to be changed to use
drm_mode_legacy_fb_format_he for >= R600, that must also handle 16 bpp,
which requires DRM_FORMAT_BIG_ENDIAN. So I still don't see how that can
be removed or even deprecated.
>From Ilia's followup it sounds like there's a similar situation with
nouveau.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
next prev parent reply other threads:[~2017-05-03 3:05 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 ` 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
2017-05-03 3:05 ` Michel Dänzer [this message]
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=28424bad-95c8-7394-4742-cd258fd71032@daenzer.net \
--to=michel@daenzer.net \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ppaalanen@gmail.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
all inboxes | Powered by JetHome®