From: Gerd Hoffmann <kraxel@redhat.com> To: Pekka Paalanen <ppaalanen@gmail.com> Cc: "Michel Dänzer" <michel@daenzer.net>, "Daniel Vetter" <daniel.vetter@intel.com>, amd-gfx@lists.freedesktop.org, "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>, "open list" <linux-kernel@vger.kernel.org> Subject: Re: [RfC PATCH] drm: fourcc byteorder: brings header file comments in line with reality. Date: Wed, 19 Apr 2017 14:34:49 +0200 [thread overview] Message-ID: <1492605289.6853.32.camel@redhat.com> (raw) In-Reply-To: <20170419100956.78e4a7ab@eldfell> Hi, > > >> BTW, this supports Gerd's patch, since the KMS fbdev emulation code uses > > >> e.g. DRM_FORMAT_XRGB8888 for depth/bpp 24/32, and the fbdev API uses > > >> native endian packed colour values. > > > > > > Same is true for DRM_IOCTL_MODE_ADDFB, with depth/bpp 24/32 you'll get > > > DRM_FORMAT_XRGB8888 (only DRM_IOCTL_MODE_ADDFB2 allows userspace specify > > > fourcc formats directly). > > > > Right, and since all major Xorg drivers use DRM_IOCTL_MODE_ADDFB, > > they're effectively using DRM_FORMAT_XRGB8888 as native endianness as well. > > I sincerely hope this doesn't actually force us into a place where we > have XRGB8888 (and ARGB8888?) as native-endian, but the other format > codes - since being used explicitly - must be kept as little-endian > because they were used like that honouring the documentation we have > atm. My expectation is that the other formats are (almost) unused in practice. cairo for example supports XRGB8888 + ARGB8888 (native endian) only from all depth/bpp 24/32 formats. IIRC there was a brief discussion how we should handle endianness in qemu stdvga / bochsdrm.ko before we've added the new (virtual) hardware register to switch endianness. The idea to simply run with fixed endianness (framebuffer is always little endian) was shot down quickly with the argument that this isn't going to fly due to lack of support for XRGB8888 in non-native byte order in the whole graphics stack. > It's starting to resemble the wl_shm format codes problem we have > on Wayland for BE. > > Has this now turned into a question of what the kernel drivers do > with the DRM pixel format codes? > > Hmm, I suppose that has been the question all along... Yep, basically. I have the impression that drivers are either consider those formats being native endian or simply don't care because they are never used in systems with bigendian (-capable) cpus. Anyone aware of anything else? Guess I'll go prepare a new version of the patch, declaring all rgb formats as native endian and putting a bunch of points from this thread into the commit message. cheers, Gerd
WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> To: Pekka Paalanen <ppaalanen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: "Daniel Vetter" <daniel.vetter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>, "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>, "dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" <dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, "open list" <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Subject: Re: [RfC PATCH] drm: fourcc byteorder: brings header file comments in line with reality. Date: Wed, 19 Apr 2017 14:34:49 +0200 [thread overview] Message-ID: <1492605289.6853.32.camel@redhat.com> (raw) In-Reply-To: <20170419100956.78e4a7ab@eldfell> Hi, > > >> BTW, this supports Gerd's patch, since the KMS fbdev emulation code uses > > >> e.g. DRM_FORMAT_XRGB8888 for depth/bpp 24/32, and the fbdev API uses > > >> native endian packed colour values. > > > > > > Same is true for DRM_IOCTL_MODE_ADDFB, with depth/bpp 24/32 you'll get > > > DRM_FORMAT_XRGB8888 (only DRM_IOCTL_MODE_ADDFB2 allows userspace specify > > > fourcc formats directly). > > > > Right, and since all major Xorg drivers use DRM_IOCTL_MODE_ADDFB, > > they're effectively using DRM_FORMAT_XRGB8888 as native endianness as well. > > I sincerely hope this doesn't actually force us into a place where we > have XRGB8888 (and ARGB8888?) as native-endian, but the other format > codes - since being used explicitly - must be kept as little-endian > because they were used like that honouring the documentation we have > atm. My expectation is that the other formats are (almost) unused in practice. cairo for example supports XRGB8888 + ARGB8888 (native endian) only from all depth/bpp 24/32 formats. IIRC there was a brief discussion how we should handle endianness in qemu stdvga / bochsdrm.ko before we've added the new (virtual) hardware register to switch endianness. The idea to simply run with fixed endianness (framebuffer is always little endian) was shot down quickly with the argument that this isn't going to fly due to lack of support for XRGB8888 in non-native byte order in the whole graphics stack. > It's starting to resemble the wl_shm format codes problem we have > on Wayland for BE. > > Has this now turned into a question of what the kernel drivers do > with the DRM pixel format codes? > > Hmm, I suppose that has been the question all along... Yep, basically. I have the impression that drivers are either consider those formats being native endian or simply don't care because they are never used in systems with bigendian (-capable) cpus. Anyone aware of anything else? Guess I'll go prepare a new version of the patch, declaring all rgb formats as native endian and putting a bunch of points from this thread into the commit message. cheers, Gerd _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-04-19 12:34 UTC|newest] Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-10 10:12 [RfC PATCH] drm: fourcc byteorder: brings header file comments in line with reality Gerd Hoffmann 2017-04-10 10:12 ` Gerd Hoffmann 2017-04-10 12:02 ` Daniel Vetter 2017-04-10 12:02 ` Daniel Vetter 2017-04-10 16:28 ` Alex Deucher 2017-04-10 16:28 ` Alex Deucher 2017-04-10 13:12 ` Pekka Paalanen 2017-04-10 13:12 ` Pekka Paalanen 2017-04-10 14:17 ` Gerd Hoffmann 2017-04-10 14:17 ` Gerd Hoffmann 2017-04-10 14:45 ` Ilia Mirkin 2017-04-10 14:45 ` Ilia Mirkin 2017-04-10 16:26 ` Alex Deucher 2017-04-10 16:26 ` Alex Deucher 2017-04-10 15:09 ` Pekka Paalanen 2017-04-10 15:09 ` Pekka Paalanen 2017-04-10 16:10 ` Ilia Mirkin 2017-04-10 16:10 ` Ilia Mirkin 2017-04-11 7:31 ` Pekka Paalanen 2017-04-11 7:31 ` Pekka Paalanen 2017-04-11 11:23 ` Gerd Hoffmann 2017-04-11 11:23 ` Gerd Hoffmann 2017-04-13 7:44 ` Pekka Paalanen 2017-04-13 7:44 ` Pekka Paalanen 2017-04-11 14:18 ` Ilia Mirkin 2017-04-11 14:18 ` Ilia Mirkin 2017-04-17 6:43 ` Ilia Mirkin 2017-04-18 2:53 ` Michel Dänzer 2017-04-18 2:53 ` Michel Dänzer 2017-04-18 5:04 ` Ilia Mirkin 2017-04-18 5:04 ` Ilia Mirkin 2017-04-18 5:58 ` Michel Dänzer 2017-04-18 5:58 ` Michel Dänzer 2017-04-18 10:14 ` Gerd Hoffmann 2017-04-18 10:14 ` Gerd Hoffmann 2017-04-19 1:01 ` Michel Dänzer 2017-04-19 1:01 ` Michel Dänzer 2017-04-19 3:19 ` Ilia Mirkin 2017-04-19 3:19 ` Ilia Mirkin 2017-04-19 3:28 ` Ilia Mirkin 2017-04-19 3:28 ` Ilia Mirkin 2017-04-19 7:09 ` Pekka Paalanen 2017-04-19 7:09 ` Pekka Paalanen 2017-04-19 12:34 ` Gerd Hoffmann [this message] 2017-04-19 12:34 ` Gerd Hoffmann 2017-04-18 10:00 ` Gerd Hoffmann 2017-04-18 10:00 ` Gerd Hoffmann 2017-04-18 11:18 ` Pekka Paalanen 2017-04-18 11:18 ` Pekka Paalanen 2017-04-18 13:39 ` Gerd Hoffmann 2017-04-18 13:39 ` Gerd Hoffmann 2017-04-18 14:01 ` Pekka Paalanen 2017-04-18 14:01 ` Pekka Paalanen 2017-04-18 20:50 ` Gerd Hoffmann 2017-04-18 20:50 ` 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=1492605289.6853.32.camel@redhat.com \ --to=kraxel@redhat.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=daniel.vetter@intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=michel@daenzer.net \ --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: linkBe 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.