mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-09 10:58:06 +02:00
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__. |
||
|---|---|---|
| .. | ||
| Android.mk | ||
| common.h | ||
| format.c | ||
| format.h | ||
| kms.c | ||
| kms.h | ||
| Makefile.sources | ||
| meson.build | ||
| pattern.c | ||
| pattern.h | ||