All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: dri-devel@lists.freedesktop.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH libdrm v3 0/9] Big-endian fixes
Date: Wed, 25 Oct 2023 09:23:40 +0200	[thread overview]
Message-ID: <cover.1698217235.git.geert@linux-m68k.org> (raw)

	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 v2[1]:
  - 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[2]:
  - 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 opened a merge request at [3].

Thanks for your comments!

[1] "[PATCH libdrm v2 00/10] Big-endian fixes"
    https://lore.kernel.org/r/cover.1657302103.git.geert@linux-m68k.org/#t
[2] "[PATCH RFC libdrm 0/2] Big-endian fixes"
    https://lore.kernel.org/r/cover.1646684158.git.geert@linux-m68k.org
[3] https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/331

Geert Uytterhoeven (9):
  intel: improve checks for big-endian
  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            |   2 +-
 tests/modetest/buffers.c  |   4 ++
 tests/modetest/modetest.c |  15 +++--
 tests/util/format.c       |   3 +
 tests/util/pattern.c      | 117 +++++++++++++++++++++++++++++++-------
 5 files changed, 114 insertions(+), 27 deletions(-)

-- 
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

             reply	other threads:[~2023-10-25  7:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25  7:23 Geert Uytterhoeven [this message]
2023-10-25  7:23 ` [PATCH libdrm v3 1/9] intel: improve checks for big-endian Geert Uytterhoeven
2023-10-25  7:23 ` [PATCH libdrm v3 2/9] util: fix 32 bpp patterns on big-endian Geert Uytterhoeven
2023-10-25  7:23 ` [PATCH libdrm v3 3/9] util: fix 16 " Geert Uytterhoeven
2023-10-25  7:23 ` [PATCH libdrm v3 4/9] util: add missing big-endian RGB16 frame buffer formats Geert Uytterhoeven
2023-10-25  7:23 ` [PATCH libdrm v3 5/9] modetest: add support for parsing big-endian formats Geert Uytterhoeven
2023-10-25  7:23 ` [PATCH libdrm v3 6/9] util: add test pattern support for big-endian XRGB1555/RGB565 Geert Uytterhoeven
2023-10-25  7:23 ` [PATCH libdrm v3 7/9] util: fix pwetty on big-endian Geert Uytterhoeven
2023-10-25  7:23 ` [PATCH libdrm v3 8/9] util: add pwetty support for big-endian RGB565 Geert Uytterhoeven
2023-10-25  7:23 ` [PATCH libdrm v3 9/9] modetest: add support for big-endian XRGB1555/RGB565 Geert Uytterhoeven

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=cover.1698217235.git.geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=dri-devel@lists.freedesktop.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 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.