[igt-dev] [PATCH i-g-t v2 2/3] igt/kms_fronbuffer_tracking: Handle ENODEV when checking i915_edp_psr_status for chipset support

Marta Lofstedt marta.lofstedt at intel.com
Thu Feb 22 08:00:11 UTC 2018


If the machine doesn't support PSR, it will return -ENODEV from
i915_edp_psr_status, which we want to interpret as unsupported.
This is in line with what Chris just fixed for FBC.

V2: Copy-pasted to the correct place

Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
---
 tests/kms_frontbuffer_tracking.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 57ae047b..1483c228 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1638,6 +1638,9 @@ static bool psr_sink_has_support(void)
 	char buf[256];
 
 	debugfs_read("i915_edp_psr_status", buf);
+	if (*buf == '\0') /* !HAS_PSR -> -ENODEV*/
+		return false;
+
 	return strstr(buf, "Sink_Support: yes\n");
 }
 
-- 
2.11.0



More information about the igt-dev mailing list