summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tests
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-01-02 14:29:16 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2023-01-03 16:23:24 +0300
commita5b1a681dcac2eb75129e5e1bc2530dbd6febc44 (patch)
treecbc1daac9aa9b1820f0555f62848131b7a3608b3 /drivers/gpu/drm/tests
parentf35cd3fa77293c2cd03e94b6a6151e1a7d9309cf (diff)
downloadlinux-a5b1a681dcac2eb75129e5e1bc2530dbd6febc44.tar.xz
drm/format-helper: Comment on RGB888 byte order
RGB888 is different than the other formats as most of its pixels are unaligned and therefore helper functions do not use endianness conversion helpers. Comment on this in the source code. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230102112927.26565-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/tests')
-rw-r--r--drivers/gpu/drm/tests/drm_format_helper_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
index 2191e57f2297..cd1d7da3483c 100644
--- a/drivers/gpu/drm/tests/drm_format_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
@@ -407,6 +407,10 @@ static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test)
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, xrgb8888);
iosys_map_set_vaddr(&src, xrgb8888);
+ /*
+ * RGB888 expected results are already in little-endian
+ * order, so there's no need to convert the test output.
+ */
drm_fb_xrgb8888_to_rgb888(&dst, &result->dst_pitch, &src, &fb, &params->clip);
KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
}