mbox series

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

Message ID cover.1646684158.git.geert@linux-m68k.org (mailing list archive)
Headers show
Series Big-endian fixes | expand

Message

Geert Uytterhoeven March 7, 2022, 8:53 p.m. UTC
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(-)