drm/tests
Geert Uytterhoeven 8cb6d837cc util: fix 32 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 swap32() helper to byteswap 32-bit values, and a
cpu_to_le32() helper to convert 32-bit values from CPU-endian to
little-endian, and use the latter in the various pattern fill functions
for 32-bit formats.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
v5:
  - Add Reviewed-by,

v4:
  - Use new HAVE_BIG_ENDIAN symbol,

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

v2:
  - Add Acked-by,
  - Add swap32() intermediate helper,
  - Add __ARM_BIG_ENDIAN and __s390__.
2023-10-31 13:24:32 +00:00
..
amdgpu amdgpu: Use PRI?64 to format uint64_t 2023-09-04 09:31:55 +02:00
etnaviv tests/etnaviv_2d_test: check whether the rendering is correct 2020-12-09 16:00:51 +01:00
exynos libkms: Remove libkms completely 2022-04-15 22:40:29 +00:00
modeprint tests: use drmModeGetConnectorTypeName 2022-07-02 20:13:29 +00:00
modetest modetest: add support for DRM_FORMAT_NV{15,20,30} 2023-10-30 12:25:09 +00:00
nouveau use standard `__typeof__()` instead of GNU extension `typeof()` 2022-01-19 16:08:31 -08:00
proptest tests: use drmModeGetConnectorTypeName 2022-07-02 20:13:29 +00:00
radeon Revert "Revert "libdrm: remove autotools support"" 2019-10-18 18:05:45 +01:00
tegra tests: tegra: Add VIC flip test 2022-02-23 16:06:49 +01:00
ttmtest fix various typos 2019-04-17 18:23:25 +01:00
util util: fix 32 bpp patterns on big-endian 2023-10-31 13:24:32 +00:00
vbltest meson: always define whether headers exist 2020-01-23 17:00:12 +00:00
Android.mk android: simplify the including rule of subdirs 2015-03-20 17:07:21 +00:00
drmdevice.c Remove unused 3rd parameter to open(2) 2022-08-23 22:43:38 +00:00
drmsl.c drmsltest: Check expected neighbours 2017-08-21 13:05:13 +01:00
hash.c tests/hash: return non-zero on failure 2015-04-05 15:33:06 +01:00
meson.build libkms: Remove libkms completely 2022-04-15 22:40:29 +00:00