Re: [PATCH RFC libdrm 2/2] util: Fix 32 bpp patterns on big-endian

2022-03-08 Thread Pekka Paalanen
On Mon, 7 Mar 2022 21:53:42 +0100 Geert Uytterhoeven wrote: > 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 cpu_to_le32() helper to convert 32-bit

[PATCH RFC libdrm 2/2] util: Fix 32 bpp patterns on big-endian

2022-03-07 Thread Geert Uytterhoeven
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 cpu_to_le32() helper to convert 32-bit values from CPU-endian to little-endian, and use them in the various pattern