[igt-dev] [PATCH i-g-t] tests/kms_hdr: Fix failure to read output_bpc on AMD hardware

Stylon Wang stylon.wang at amd.com
Fri Oct 1 08:53:19 UTC 2021


The first commit with TEST_ONLY flag in bpc-switch subtests
could in some cases cause reading of output_bpc on connectors
to fail on AMD hardware.

Use ALLOW_MODESET to prevent this from happening.

Signed-off-by: Stylon Wang <stylon.wang at amd.com>
---
 tests/kms_hdr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index 5b8529c8..a4983b9a 100644
--- a/tests/kms_hdr.c
+++ b/tests/kms_hdr.c
@@ -217,7 +217,7 @@ static void test_bpc_switch_on_output(data_t *data, igt_output_t *output,
 		igt_plane_set_fb(data->primary, &afb);
 		igt_plane_set_size(data->primary, data->w, data->h);
 		igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
-		ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY, NULL);
+		ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 		if (!ret) {
 			data->w = afb.width;
 			data->h = afb.height;
-- 
2.32.0



More information about the igt-dev mailing list