]> git.baikalelectronics.ru Git - kernel.git/commit
drm/format-helper: Fix test on big endian architectures
authorJosé Expósito <jose.exposito89@gmail.com>
Tue, 26 Jul 2022 23:09:13 +0000 (01:09 +0200)
committerJosé Expósito <jose.exposito89@gmail.com>
Thu, 28 Jul 2022 16:36:43 +0000 (18:36 +0200)
commitf16fc7ea2bd41f4837881edf5cd7dd3fa8c33e88
treecfe7b52dbbb4708db42bff7535cdb6708aea0592
parent3ec2cb8e787b2560ed01f8b4e3c51de5b7168413
drm/format-helper: Fix test on big endian architectures

The tests fail on big endian architectures, like PowerPC:

 $ ./tools/testing/kunit/kunit.py run \
   --kunitconfig=drivers/gpu/drm/tests \
   --arch=powerpc --cross_compile=powerpc64-linux-gnu-

Transform the XRGB8888 buffer from little endian to the CPU endian
before calling the conversion function to avoid this error.

Fixes: bd1a30f08a17 ("drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()")
Reported-by: David Gow <davidgow@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220726230916.390575-2-jose.exposito89@gmail.com
drivers/gpu/drm/tests/drm_format_helper_test.c