drm/tests: fix drm_test_fb_xrgb8888_to_xrgb2101010 on big endian
Subsystems (2)
Dave Airlie
maintainerPATCH 1/1 drm/tests: fix drm_test_fb_xrgb8888_to_xrgb2101010 on big endian
From: Dave Airlie <[email protected]>
This test is failing for me on s390x and there is a report on the list from ppc64.
This aligns it with the argb test that doesn't fail.
Fixes 15bda1f8de5d ("drm/tests: Add calls to drm_fb_blit() on supported format conversion tests")
Reported-by Erhard Furtner <[email protected]>
Signed-off-by Dave Airlie <[email protected]>
--- drivers/gpu/drm/tests/drm_format_helper_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/tests/drm_format_helper_test.c +3 -1
@@ -991,7 +991,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test) NULL : &result->dst_pitch;drm_fb_xrgb8888_to_xrgb2101010 (&dst, dst_pitch, &src, &fb, ¶ms->clip, &fmtcnv_state); - buf =le32buf_to_cpu (test, buf, dst_size /sizeof (u32)); + buf =le32buf_to_cpu (test, (__force const __le32 *)buf, dst_size /sizeof (u32));KUNIT_EXPECT_MEMEQ (test, buf, result->expected, dst_size); buf = dst.vaddr;/* restore original value of buf */
@@ -1002,6 +1002,8 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test) blit_result =drm_fb_blit (&dst, dst_pitch,DRM_FORMAT_XRGB2101010 , &src, &fb, ¶ms->clip, &fmtcnv_state); + buf =le32buf_to_cpu (test, (__force const __le32 *)buf, dst_size /sizeof (u32)); +KUNIT_EXPECT_FALSE (test, blit_result);KUNIT_EXPECT_MEMEQ (test, buf, result->expected, dst_size); }
Signature · 1 line
2.44.0
Dave Airlie <[email protected]> writes:
Hello Dave,
Quoted 27 lines
From: Dave Airlie <[email protected]>
This test is failing for me on s390x and there is a report on the list from ppc64.
This aligns it with the argb test that doesn't fail.
Fixes 15bda1f8de5d ("drm/tests: Add calls to drm_fb_blit() on supported format conversion tests")Reported-by Erhard Furtner <[email protected]>Signed-off-by Dave Airlie <[email protected]>--- drivers/gpu/drm/tests/drm_format_helper_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/tests/drm_format_helper_test.c +1
-1@@ -991,7 +991,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test) NULL : &result->dst_pitch;drm_fb_xrgb8888_to_xrgb2101010 (&dst, dst_pitch, &src, &fb, ¶ms->clip, &fmtcnv_state); - buf =le32buf_to_cpu (test, buf, dst_size /sizeof (u32)); + buf =le32buf_to_cpu (test, (__force const __le32 *)buf, dst_size /sizeof (u32));KUNIT_EXPECT_MEMEQ (test, buf, result->expected, dst_size); buf = dst.vaddr;/* restore original value of buf */
drivers/gpu/drm/tests/drm_format_helper_test.c static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test) · line 1009
Quoted 8 lines
drivers/gpu/drm/tests/drm_format_helper_test.c +2
-0@@ -1002,6 +1002,8 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test) blit_result =drm_fb_blit (&dst, dst_pitch,DRM_FORMAT_XRGB2101010 , &src, &fb, ¶ms->clip, &fmtcnv_state); + buf =le32buf_to_cpu (test, (__force const __le32 *)buf, dst_size /sizeof (u32)); +KUNIT_EXPECT_FALSE (test, blit_result);KUNIT_EXPECT_MEMEQ (test, buf, result->expected, dst_size); }
Looks good to me, and as you said it makes the test consistent with the drm_fb_xrgb8888_to_argb2101010() test that didn't fail for you on s390x.
Reviewed-by Javier Martinez Canillas <[email protected]>
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat