]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/tests: Fix drm_test_fb_xrgb8888_to_xrgb2101010() on big-endian
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 30 Jun 2025 09:00:54 +0000 (11:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:34:43 +0000 (16:34 +0200)
[ Upstream commit 05663d88fd0b8ee1c54ab2d5fb36f9b6a3ed37f7 ]

Fix failures on big-endian architectures on tests cases
single_pixel_source_buffer, single_pixel_clip_rectangle,
well_known_colors and destination_pitch.

Fixes: 15bda1f8de5d ("drm/tests: Add calls to drm_fb_blit() on supported format conversion tests")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250630090054.353246-2-jose.exposito89@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/tests/drm_format_helper_test.c

index 8b62adbd4dfa91a0acbf44a123fcf1773111cd63..e17643c408bf4b4d9cf2911b753d9878582b5687 100644 (file)
@@ -1040,6 +1040,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
        memset(buf, 0, dst_size);
 
        drm_fb_xrgb8888_to_xrgb2101010(&dst, dst_pitch, &src, &fb, &params->clip, &fmtcnv_state);
+       buf = le32buf_to_cpu(test, (__force const __le32 *)buf, dst_size / sizeof(u32));
        KUNIT_EXPECT_MEMEQ(test, buf, result->expected, dst_size);
 }