[PATCH RFC libdrm 0/2] Big-endian fixes

Geert Uytterhoeven geert at linux-m68k.org
Mon Mar 7 20:53:40 UTC 2022


	Hi all,

When starting to use modetest, I was a bit surprised to discover the
default XR24 format wasn't displayed correctly on my work-in-progress
Atari DRM driver, which runs on a big-endian system.

This RFC patch series fixes some endianness issues in libdrm.
It has been tested on ARAnyM using a work-in-progress Atari DRM driver,
which can now display the XR24 format by converting XRGB8888 to RGB332.

Overview:
  - Patch 1 improves the existing endianness checks in a header file for
    the Intel driver,
  - Patch 2 fixes the display of 32 bpp patterns on big-endian systems.

Futher endian fixes may be needed.  Note that I also have a variant of
patch 2 for 16 bpp, which works with the Atari DRM driver converting
RGB565 to RGB332.  But I want to get real 16 bpp working in the Atari
DRM driver first, as that uses a 16-bit big endian format.
And what about 24 bpp?

Please refer to [1] for more information.

Thanks for your comments!

[1] "[PATCH v2 00/10] drm: Add support for low-color frame buffer formats"
    https://lore.kernel.org/r/cover.1646683502.git.geert@linux-m68k.org

Geert Uytterhoeven (2):
  intel: Improve checks for big-endian
  util: Fix 32 bpp patterns on big-endian

 intel/uthash.h       |  2 +-
 tests/util/pattern.c | 30 +++++++++++++++++++++---------
 2 files changed, 22 insertions(+), 10 deletions(-)

-- 
2.25.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


More information about the dri-devel mailing list