[PATCH i-g-t v3] lib/igt_psr: Fix PSR active check for DisplayPort connectors

Naladala Ramanaidu ramanaidu.naladala at intel.com
Tue Mar 25 19:00:13 UTC 2025


Update PSR active check logic to correctly identify active
state for Panel Replay on DisplayPort connectors.

v2: Rejected.
v3: Fix null pointer crashes by adding a change to prevent
    potential null pointer dereferences.

Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
Reviewed-by: Jouni Högander <jouni.hogander at intel.com>
---
 lib/igt_psr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 83c21e6ba..6e5f29b24 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -122,7 +122,9 @@ static bool psr_active_check(int debugfs_fd, enum psr_mode mode, igt_output_t *o
 
 	igt_skip_on(strstr(buf, "PSR sink not reliable: yes"));
 
-	active = strstr(buf, state);
+	active = strstr(buf, state) ||
+		 (c && (c->connector_type == DRM_MODE_CONNECTOR_DisplayPort) &&
+		  strstr(buf, "SU_STANDBY"));
 
 	if (active && output && sink_status_checks()) {
 		active = psr_active_sink_check(debugfs_fd, output);
-- 
2.43.0



More information about the igt-dev mailing list