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 <>
Cc: Dhinakaran Pandiyan <>
Reviewed-by: default avatarRodrigo Vivi <>
Reviewed-by: Dhinakaran Pandiyan's avatarDhinakaran Pandiyan <>
Signed-off-by: José Roberto de Souza's avatarJosé Roberto de Souza <>
parent 23f39950
......@@ -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,
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,
return ret > 0 && strstr(buf, "Sink_Support: yes\n");
return ret > 0 && (strstr(buf, "Sink_Support: yes\n") ||
strstr(buf, "Sink support: yes"));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment