[PATCH i-g-t v2 6/6] tests/kms_psr2_sf: Use stored psr mode instead of PSR_MODE_2_SEL_FETCH

Jouni Högander jouni.hogander at intel.com
Fri Jun 7 05:26:34 UTC 2024


We are already checking psr mode supported by system and storing it.
Use stored value instead of PSR_MODE_2_SEL_FETCH when enabling psr mode.

Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
 tests/intel/kms_psr2_sf.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/intel/kms_psr2_sf.c b/tests/intel/kms_psr2_sf.c
index 4c3e34aa0..f1acae258 100644
--- a/tests/intel/kms_psr2_sf.c
+++ b/tests/intel/kms_psr2_sf.c
@@ -195,6 +195,9 @@ static bool set_sel_fetch_mode_for_output(data_t *data)
 	} else
 		igt_info("selective fetch not supported on output %s\n", data->output->name);
 
+	if (supported)
+		supported = psr_enable(data->drm_fd, data->debugfs_fd, data->psr_mode, data->output);
+
 	return supported;
 }
 
@@ -1053,11 +1056,6 @@ igt_main
 			data.fbc_flag = true;
 		}
 
-		/* Test if PSR2 can be enabled */
-		igt_require_f(psr_enable(data.drm_fd,
-					 data.debugfs_fd, PSR_MODE_2_SEL_FETCH, NULL),
-			      "Error enabling PSR2\n");
-
 		data.damage_area_count = MAX_DAMAGE_AREAS;
 		data.primary_format = DRM_FORMAT_XRGB8888;
 
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list