Skip to contentSkip to conversation

drm/format-helper: Update tests after BT601 changes

PATCH In review Thomas Zimmermann 2 participants 2 messages Jun 13, 2025

Subsystems (2)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm/format-helper: Update tests after BT601 changes

Commit a979a54165c2 ("drm/format-helper: Normalize BT.601 factors to 256") improved rounding precicion of the BT601 calculation, which impacts the results of soem of the format-helper tests. Adapt the test to the new results.

Fixes a979a54165c2 ("drm/format-helper: Normalize BT.601 factors to 256")
Cc Thomas Zimmermann <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
---
 drivers/gpu/drm/tests/drm_format_helper_test.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/tests/drm_format_helper_test.c +6 -6
index 35cd3405d045..5aa8543ceb29 100644
@@ -279,9 +279,9 @@ static struct convert_xrgb8888_case convert_xrgb8888_cases[] = {
 			.dst_pitch = TEST_USE_DEFAULT_PITCH,
 			.expected = {
 				0xFF, 0x00,
-				0x4C, 0x99,
-				0x19, 0x66,
-				0xE5, 0xB2,
+				0x4C, 0x95,
+				0x1C, 0x69,
+				0xE2, 0xB2,
 			},
 		},
 		.rgb332_result = {
@@ -430,9 +430,9 @@ static struct convert_xrgb8888_case convert_xrgb8888_cases[] = {
 		.gray8_result = {
 			.dst_pitch = 5,
 			.expected = {
-				0x3C, 0x33, 0xC4, 0x00, 0x00,
-				0xBB, 0x3C, 0x33, 0x00, 0x00,
-				0x34, 0xBB, 0x3C, 0x00, 0x00,
+				0x3D, 0x32, 0xC1, 0x00, 0x00,
+				0xBA, 0x3D, 0x32, 0x00, 0x00,
+				0x34, 0xBA, 0x3D, 0x00, 0x00,
 			},
 		},
 		.rgb332_result = {
Signature · 1 line
2.49.0
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Thomas Zimmermann

Commit a979a54165c2 ("drm/format-helper: Normalize BT.601 factors to 256") improved rounding precicion of the BT601 calculation, which impacts the results of soem of the format-helper tests. Adapt the test to the new results.

Fixes a979a54165c2 ("drm/format-helper: Normalize BT.601 factors to 256")
Cc Thomas Zimmermann <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Quoted 4 lines
---
 drivers/gpu/drm/tests/drm_format_helper_test.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat