diff options
author | Lofstedt, Marta <marta.lofstedt@intel.com> | 2018-02-22 10:00:10 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2018-02-22 14:05:09 +0200 |
commit | 2430bf908517d59644a81374bc809a9751bfaf83 (patch) | |
tree | c6c1e90e4c7403a8ca3c00eaa42aa0bca9033cdd /tests/kms_fbcon_fbt.c | |
parent | f09f5c6a197424cef702222d6864416ac1f4fd23 (diff) |
igt/kms_fbcon_fbt: Handle ENODEV when checking i915_edp_psr_status for chipset support
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 position.
Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/kms_fbcon_fbt.c')
-rw-r--r-- | tests/kms_fbcon_fbt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c index 1b236f8b..b01c769c 100644 --- a/tests/kms_fbcon_fbt.c +++ b/tests/kms_fbcon_fbt.c @@ -165,6 +165,9 @@ static bool psr_supported_on_chipset(int fd) char buf[256]; igt_debugfs_read(fd, "i915_edp_psr_status", buf); + if (*buf == '\0') /* !HAS_PSR -> -ENODEV*/ + return false; + return strstr(buf, "Sink_Support: yes\n"); } |