[PATCH i-g-t v3 2/2] lib/igt_psr: Fix PR state check for DisplayPort connectors

Naladala Ramanaidu ramanaidu.naladala at intel.com
Wed Sep 11 20:24:08 UTC 2024


The PR state check logic has been updated to handle DisplayPort
connectors.

v1: Update connecter logic for PR tests.

Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
---
 lib/igt_psr.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 222e05e6c..99f08f3c2 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -77,12 +77,11 @@ static bool psr_active_check(int debugfs_fd, enum psr_mode mode, igt_output_t *o
 	if (mode == PR_MODE || mode == PR_MODE_SEL_FETCH) {
 		igt_assert_f(output, "Output not given\n");
 		c = output->config.connector;
-	}
-
-	if ((mode == PR_MODE || mode == PR_MODE_SEL_FETCH) &&
-	    c && c->connector_type == DRM_MODE_CONNECTOR_eDP)
-		state = "SLEEP";
-	else if (mode == PSR_MODE_1 || mode == PR_MODE || mode == PR_MODE_SEL_FETCH)
+		if (c->connector_type == DRM_MODE_CONNECTOR_DisplayPort)
+			state = "SRDENT_ON";
+		else if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
+			state = "SLEEP";
+	} else if (mode == PSR_MODE_1)
 		state = "SRDENT";
 	else if (mode == PSR_MODE_2 || mode == PSR_MODE_2_SEL_FETCH)
 		state = "DEEP_SLEEP";
-- 
2.43.0



More information about the igt-dev mailing list