From: "Michel Dänzer" <michel@daenzer.net>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
ML dri-devel <dri-devel@lists.freedesktop.org>,
amd-gfx mailing list <amd-gfx@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 1/3] drm: fourcc byteorder: drop DRM_FORMAT_BIG_ENDIAN
Date: Mon, 8 May 2017 09:38:10 +0900 [thread overview]
Message-ID: <f148eb26-4ebd-75c7-5067-22d2c8f3a65f@daenzer.net> (raw)
In-Reply-To: <1493803481.8581.163.camel@redhat.com>
On 03/05/17 06:24 PM, Gerd Hoffmann wrote:
> Hi,
>
>>> 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.
>
> Ok.
>
> Dropped patch #1.
>
> Updated patch #2 to include all formats returned by
> drm_mode_legacy_fb_format, and also renamed them to DRM_FORMAT_HOST_*.
>
> Question is how to go forward with patch #3. I'd prefer to not add
> drm_mode_legacy_fb_format_he if possible. Is there a chance to adapt
> the radeon and nvidia drivers to a fixed drm_mode_legacy_fb_format
> function (returning be formats on be) without invasive changes? Given
> they both treat formats as if they had DRM_FORMAT_BIG_ENDIAN set this
> could (with the help of the extended patch #2) be a simple
> s/DRM_FORMAT_/DRM_FORMAT_HOST/ at the right places ...
For radeon this doesn't work with pre-R600 GPUs, which only support
little endian formats for display.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
next prev parent reply other threads:[~2017-05-08 0:38 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
2017-05-03 3:05 ` Michel Dänzer
2017-05-03 9:24 ` Gerd Hoffmann
2017-05-08 0:38 ` Michel Dänzer [this message]
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=f148eb26-4ebd-75c7-5067-22d2c8f3a65f@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 \
/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).