[igt-dev] [PATCH i-g-t 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 07:43:42 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.

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

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



More information about the igt-dev mailing list