drm/tests/util
Geert Uytterhoeven 1b8d0e5ccd util: fix 16 bpp patterns on big-endian
DRM formats are defined to be little-endian, unless the
DRM_FORMAT_BIG_ENDIAN flag is set.  Hence writes of multi-byte pixel
values need to take endianness into account.

Introduce a swap16() helper to byteswap 16-bit values, and a
cpu_to_le16() helper to convert 16-bit values from CPU-endian to
little-endian, and use the latter in the various pattern fill functions
for 16-bit formats.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - No changes,

v3:
  - Increase indentation after definition of cpu_to_le16(),

v2:
  - New.
2023-10-31 13:24:32 +00:00
..
Android.mk Android: fix building of modetest and proptest 2017-04-03 17:46:06 +01:00
Makefile.sources tests: Move name tables to libutil 2015-12-18 17:44:01 +00:00
common.h tests: Split helpers into library 2015-12-18 17:43:40 +00:00
format.c modetest: add support for DRM_FORMAT_NV{15,20,30} 2023-10-30 12:25:09 +00:00
format.h util: store number of colors for indexed formats 2023-10-24 09:44:21 +02:00
kms.c tests/util: Add vkms driver 2023-02-10 05:22:52 +00:00
kms.h tests: use drmModeGetConnectorTypeName 2022-07-02 20:13:29 +00:00
meson.build Add meson build system 2018-01-12 09:40:48 -08:00
pattern.c util: fix 16 bpp patterns on big-endian 2023-10-31 13:24:32 +00:00
pattern.h util: factor out and optimize C8 SMPTE color LUT 2023-10-24 09:44:04 +02:00