[igt-dev] [PATCH i-g-t 03/10] lib/psr: Add support to new modified i915_edp_psr_status output
José Roberto de Souza
jose.souza at intel.com
Sat Jan 12 01:46:00 UTC 2019
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 at intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
lib/igt_psr.c | 7 ++++---
1 file 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"));
}
--
2.20.1
More information about the igt-dev
mailing list