summaryrefslogtreecommitdiff
path: root/lib/igt_psr.c
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2018-10-04 13:12:41 -0700
committerJosé Roberto de Souza <jose.souza@intel.com>2019-01-22 14:05:35 -0800
commit5ef25867499fadf39f7eb81bab5f07158b740093 (patch)
treec5e34cc198554e7775269abe4a22a2ad2863c95b /lib/igt_psr.c
parent23f39950e824b8a8f31cfb26fc9b37ab1aca656f (diff)
lib/psr: Add support to new modified i915_edp_psr_status output
The kernel patch 'drm/i915: Refactor PSR status debugfs' changed the output of i915_edp_psr_status, so adding support to the new output here while keeping the support to the old one for a while. In psr_active() we were overdoing, we just need to check the source state to know if PSR is active and doing that we keep compability to old and new i915_edp_psr_status output. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'lib/igt_psr.c')
-rw-r--r--lib/igt_psr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 82012e6d..a59ff94e 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -32,8 +32,8 @@ static bool psr_active(int debugfs_fd, bool check_active)
igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
sizeof(buf));
- active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
- (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
+
+ active = strstr(buf, "SRDENT") || strstr(buf, "SLEEP");
return check_active ? active : !active;
}
@@ -137,5 +137,6 @@ bool psr_sink_support(int debugfs_fd)
ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
sizeof(buf));
- return ret > 0 && strstr(buf, "Sink_Support: yes\n");
+ return ret > 0 && (strstr(buf, "Sink_Support: yes\n") ||
+ strstr(buf, "Sink support: yes"));
}