Skip to content

Big-endian fixes

Geert Uytterhoeven dri-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 0 repliesNew
  2. v39 patches 0 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9intel: determine target endianness using mesonintel/uthash.h meson.build+7 -20 replies
2/9util: fix 32 bpp patterns on big-endiantests/util/pattern.c+23 -90 replies
3/9util: fix 16 bpp patterns on big-endiantests/util/pattern.c+14 -70 replies
4/9util: add missing big-endian RGB16 frame buffer formatstests/util/format.c+3 -00 replies
5/9modetest: add support for parsing big-endian formatstests/modetest/modetest.c+9 -60 replies
6/9util: add test pattern support for big-endian XRGB1555/RGB565tests/util/pattern.c+21 -100 replies
7/9util: fix pwetty on big-endiantests/util/pattern.c+44 -00 replies
8/9util: add pwetty support for big-endian RGB565tests/util/pattern.c+1 -00 replies
9/9modetest: add support for big-endian XRGB1555/RGB565tests/modetest/buffers.c+4 -00 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchDmitry BaryshkovPekka Paalanen
1/9R-b
2/9R-b A-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH libdrm v5 0/9] Big-endian fixes

Hi all,

This patch series fixes some endianness issues in libdrm.
It has been tested on ARAnyM using a work-in-progress Atari DRM driver. After this, the smpte and tiles modetest patterns and the pwetty markers are rendered correctly using the XR24, RG16, and RG16BE formats on big-endian systems.

Changes compared to v4[1]:
- Add Reviewed-by,

Changes compared to v3[2]:
- Replace explicit #ifdef checks by a define set by meson,
- Use new HAVE_BIG_ENDIAN symbol,

Changes compared to v2[3]:
- Increase indentation after definition of cpu_to_*() macros,
- Update for suffix change from "be" to "_BE", cfr. commit

    ffb9375a505700ad ("xf86drm: handle DRM_FORMAT_BIG_ENDIAN in
    drmGetFormatName()"),

- Replace hardcoded numbers in code by sizeof(),
- Wrap byteswap_buffer{16,32}() implementation inside #if HAVE_CAIRO to avoid defined-but-not-used compiler warnings,
- Drop "modetest: Fix printing of big-endian fourcc values", as it is no longer needed since commit ffb9375a505700ad ("xf86drm: handle DRM_FORMAT_BIG_ENDIAN in drmGetFormatName()").

Changes compared to v1[4]:
- Consider arm, aarch64, microblaze, s390, and sh in endianness checks,
- Add Acked-by,
- Add swap32() intermediate helper,
- Fix 16 bpp formats on big-endian,
- Add support for big-endian XRGB1555 and RGB565,
- Fix printing of big-endian fourcc values,
- Fix pwetty on big-endian.

I have also updated the merge request at [5].

Thanks for your comments!

[1] "[PATCH libdrm v4 0/9] Big-endian fixes"

    https://lists.freedesktop.org/archives/dri-devel/2023-October/428234.html
[2] "[PATCH libdrm v3 0/9] Big-endian fixes
    https://lore.kernel.org/r/[email protected]
[3] "[PATCH libdrm v2 00/10] Big-endian fixes"
    https://lore.kernel.org/r/[email protected]/#t
[4] "[PATCH RFC libdrm 0/2] Big-endian fixes"
    https://lore.kernel.org/r/[email protected]

[5] https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/331

Geert Uytterhoeven (9):
intel: determine target endianness using meson
util: fix 32 bpp patterns on big-endian
util: fix 16 bpp patterns on big-endian
util: add missing big-endian RGB16 frame buffer formats
modetest: add support for parsing big-endian formats
util: add test pattern support for big-endian XRGB1555/RGB565
util: fix pwetty on big-endian
util: add pwetty support for big-endian RGB565
modetest: add support for big-endian XRGB1555/RGB565

 intel/uthash.h            |   4 +-
 meson.build               |   5 ++
 tests/modetest/buffers.c  |   4 ++
 tests/modetest/modetest.c |  15 +++--
 tests/util/format.c       |   3 +
 tests/util/pattern.c      | 117 +++++++++++++++++++++++++++++++-------
 6 files changed, 120 insertions(+), 28 deletions(-)
Signature · 12 lines
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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