From: Arthur Grillo <arthurgrillo@riseup.net>
To: dri-devel@lists.freedesktop.org
Cc: davidgow@google.com, tales.aparecida@gmail.com,
javierm@redhat.com, mairacanal@riseup.net, tzimmermann@suse.de,
jose.exposito89@gmail.com, andrealmeid@riseup.net,
Arthur Grillo <arthurgrillo@riseup.net>
Subject: [PATCH v3 2/2] drm/format-helper: Make "destination_pitch" test case usable for the monochrome case
Date: Sat, 11 Mar 2023 09:51:41 -0300 [thread overview]
Message-ID: <20230311125141.564801-3-arthurgrillo@riseup.net> (raw)
In-Reply-To: <20230311125141.564801-1-arthurgrillo@riseup.net>
This test case uses an arbitrary pitch size, different of the default
one, to test if the conversions methods obey.
Change the "destination_pitch" colors to change the monochrome expected
result from being just zeros, as this makes the arbitrary pitch use
unusable.
Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
---
.../gpu/drm/tests/drm_format_helper_test.c | 78 +++++++++----------
1 file changed, 39 insertions(+), 39 deletions(-)
diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
index 041b3d2f100f..bfa47f8ffd09 100644
--- a/drivers/gpu/drm/tests/drm_format_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
@@ -323,104 +323,104 @@ static struct convert_xrgb8888_case convert_xrgb8888_cases[] = {
.pitch = 3 * 4,
.clip = DRM_RECT_INIT(0, 0, 3, 3),
.xrgb8888 = {
- 0xA10E449C, 0xB1114D05, 0xC1A80303,
- 0xD16C7073, 0xA20E449C, 0xB2114D05,
- 0xC2A80303, 0xD26C7073, 0xA30E449C,
+ 0xA10E449C, 0xB1114D05, 0xC1A8F303,
+ 0xD16CF073, 0xA20E449C, 0xB2114D05,
+ 0xC2A80303, 0xD26CF073, 0xA30E449C,
},
.gray8_result = {
.dst_pitch = 5,
.expected = {
- 0x3C, 0x33, 0x34, 0x00, 0x00,
- 0x6F, 0x3C, 0x33, 0x00, 0x00,
- 0x34, 0x6F, 0x3C, 0x00, 0x00,
+ 0x3C, 0x33, 0xC4, 0x00, 0x00,
+ 0xBB, 0x3C, 0x33, 0x00, 0x00,
+ 0x34, 0xBB, 0x3C, 0x00, 0x00,
},
},
.rgb332_result = {
.dst_pitch = 5,
.expected = {
- 0x0A, 0x08, 0xA0, 0x00, 0x00,
- 0x6D, 0x0A, 0x08, 0x00, 0x00,
- 0xA0, 0x6D, 0x0A, 0x00, 0x00,
+ 0x0A, 0x08, 0xBC, 0x00, 0x00,
+ 0x7D, 0x0A, 0x08, 0x00, 0x00,
+ 0xA0, 0x7D, 0x0A, 0x00, 0x00,
},
},
.rgb565_result = {
.dst_pitch = 10,
.expected = {
- 0x0A33, 0x1260, 0xA800, 0x0000, 0x0000,
- 0x6B8E, 0x0A33, 0x1260, 0x0000, 0x0000,
- 0xA800, 0x6B8E, 0x0A33, 0x0000, 0x0000,
+ 0x0A33, 0x1260, 0xAF80, 0x0000, 0x0000,
+ 0x6F8E, 0x0A33, 0x1260, 0x0000, 0x0000,
+ 0xA800, 0x6F8E, 0x0A33, 0x0000, 0x0000,
},
.expected_swab = {
- 0x330A, 0x6012, 0x00A8, 0x0000, 0x0000,
- 0x8E6B, 0x330A, 0x6012, 0x0000, 0x0000,
- 0x00A8, 0x8E6B, 0x330A, 0x0000, 0x0000,
+ 0x330A, 0x6012, 0x80AF, 0x0000, 0x0000,
+ 0x8E6F, 0x330A, 0x6012, 0x0000, 0x0000,
+ 0x00A8, 0x8E6F, 0x330A, 0x0000, 0x0000,
},
},
.xrgb1555_result = {
.dst_pitch = 10,
.expected = {
- 0x0513, 0x0920, 0x5400, 0x0000, 0x0000,
- 0x35CE, 0x0513, 0x0920, 0x0000, 0x0000,
- 0x5400, 0x35CE, 0x0513, 0x0000, 0x0000,
+ 0x0513, 0x0920, 0x57C0, 0x0000, 0x0000,
+ 0x37CE, 0x0513, 0x0920, 0x0000, 0x0000,
+ 0x5400, 0x37CE, 0x0513, 0x0000, 0x0000,
},
},
.argb1555_result = {
.dst_pitch = 10,
.expected = {
- 0x8513, 0x8920, 0xD400, 0x0000, 0x0000,
- 0xB5CE, 0x8513, 0x8920, 0x0000, 0x0000,
- 0xD400, 0xB5CE, 0x8513, 0x0000, 0x0000,
+ 0x8513, 0x8920, 0xD7C0, 0x0000, 0x0000,
+ 0xB7CE, 0x8513, 0x8920, 0x0000, 0x0000,
+ 0xD400, 0xB7CE, 0x8513, 0x0000, 0x0000,
},
},
.rgba5551_result = {
.dst_pitch = 10,
.expected = {
- 0x0A27, 0x1241, 0xA801, 0x0000, 0x0000,
- 0x6B9D, 0x0A27, 0x1241, 0x0000, 0x0000,
- 0xA801, 0x6B9D, 0x0A27, 0x0000, 0x0000,
+ 0x0A27, 0x1241, 0xAF81, 0x0000, 0x0000,
+ 0x6F9D, 0x0A27, 0x1241, 0x0000, 0x0000,
+ 0xA801, 0x6F9D, 0x0A27, 0x0000, 0x0000,
},
},
.rgb888_result = {
.dst_pitch = 15,
.expected = {
- 0x9C, 0x44, 0x0E, 0x05, 0x4D, 0x11, 0x03, 0x03, 0xA8,
+ 0x9C, 0x44, 0x0E, 0x05, 0x4D, 0x11, 0x03, 0xF3, 0xA8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x73, 0x70, 0x6C, 0x9C, 0x44, 0x0E, 0x05, 0x4D, 0x11,
+ 0x73, 0xF0, 0x6C, 0x9C, 0x44, 0x0E, 0x05, 0x4D, 0x11,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x03, 0x03, 0xA8, 0x73, 0x70, 0x6C, 0x9C, 0x44, 0x0E,
+ 0x03, 0x03, 0xA8, 0x73, 0xF0, 0x6C, 0x9C, 0x44, 0x0E,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
},
},
.argb8888_result = {
.dst_pitch = 20,
.expected = {
- 0xFF0E449C, 0xFF114D05, 0xFFA80303, 0x00000000, 0x00000000,
- 0xFF6C7073, 0xFF0E449C, 0xFF114D05, 0x00000000, 0x00000000,
- 0xFFA80303, 0xFF6C7073, 0xFF0E449C, 0x00000000, 0x00000000,
+ 0xFF0E449C, 0xFF114D05, 0xFFA8F303, 0x00000000, 0x00000000,
+ 0xFF6CF073, 0xFF0E449C, 0xFF114D05, 0x00000000, 0x00000000,
+ 0xFFA80303, 0xFF6CF073, 0xFF0E449C, 0x00000000, 0x00000000,
},
},
.xrgb2101010_result = {
.dst_pitch = 20,
.expected = {
- 0x03844672, 0x0444D414, 0x2A20300C, 0x00000000, 0x00000000,
- 0x1B1705CD, 0x03844672, 0x0444D414, 0x00000000, 0x00000000,
- 0x2A20300C, 0x1B1705CD, 0x03844672, 0x00000000, 0x00000000,
+ 0x03844672, 0x0444D414, 0x2A2F3C0C, 0x00000000, 0x00000000,
+ 0x1B1F0DCD, 0x03844672, 0x0444D414, 0x00000000, 0x00000000,
+ 0x2A20300C, 0x1B1F0DCD, 0x03844672, 0x00000000, 0x00000000,
},
},
.argb2101010_result = {
.dst_pitch = 20,
.expected = {
- 0xC3844672, 0xC444D414, 0xEA20300C, 0x00000000, 0x00000000,
- 0xDB1705CD, 0xC3844672, 0xC444D414, 0x00000000, 0x00000000,
- 0xEA20300C, 0xDB1705CD, 0xC3844672, 0x00000000, 0x00000000,
+ 0xC3844672, 0xC444D414, 0xEA2F3C0C, 0x00000000, 0x00000000,
+ 0xDB1F0DCD, 0xC3844672, 0xC444D414, 0x00000000, 0x00000000,
+ 0xEA20300C, 0xDB1F0DCD, 0xC3844672, 0x00000000, 0x00000000,
},
},
.mono_result = {
.dst_pitch = 2,
.expected = {
- 0b000, 0b000,
- 0b000, 0b000,
- 0b000, 0b000,
+ 0b100, 0b000,
+ 0b001, 0b000,
+ 0b010, 0b000,
},
},
},
--
2.39.2
next prev parent reply other threads:[~2023-03-11 12:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 12:51 [PATCH v3 0/2] drm/format-helper: Add Kunit tests for drm_fb_xrgb8888_to_mono() Arthur Grillo
2023-03-11 12:51 ` [PATCH v3 1/2] " Arthur Grillo
2023-03-14 19:08 ` Javier Martinez Canillas
2023-03-14 22:17 ` Arthur Grillo Queiroz Cabral
2023-03-16 20:04 ` Javier Martinez Canillas
2023-03-11 12:51 ` Arthur Grillo [this message]
2023-03-14 19:11 ` [PATCH v3 2/2] drm/format-helper: Make "destination_pitch" test case usable for the monochrome case Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230311125141.564801-3-arthurgrillo@riseup.net \
--to=arthurgrillo@riseup.net \
--cc=andrealmeid@riseup.net \
--cc=davidgow@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jose.exposito89@gmail.com \
--cc=mairacanal@riseup.net \
--cc=tales.aparecida@gmail.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.