[i-g-t 1/7] lib/i915/intel_drrs: Fix igt helper to get drrs status

Bhanuprakash Modem bhanuprakash.modem at intel.com
Thu Dec 28 07:50:17 UTC 2023


intel_is_drrs_supported() helper is giving False if DRRS
supports on selected pipe which is not correct. Fix the
helper to give True if DRRS supports on selected pipe.

Fixes: c6f857e46 lib/i915/drrs: Add drrs helpers
Cc: Jouni Högander <jouni.hogander at intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 lib/i915/intel_drrs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/i915/intel_drrs.c b/lib/i915/intel_drrs.c
index deaec90d3..9c6aefbf6 100644
--- a/lib/i915/intel_drrs.c
+++ b/lib/i915/intel_drrs.c
@@ -29,10 +29,8 @@ bool intel_is_drrs_supported(int device, enum pipe pipe)
 	igt_require_fd(dir);
 	igt_debugfs_simple_read(dir, "i915_drrs_status", buf, sizeof(buf));
 	close(dir);
-	if (*buf == '\0')
-		return false;
 
-	return !strcasestr(buf, "DRRS enabled:");
+	return strstr(buf, "DRRS enabled: yes");
 }
 
 /**
-- 
2.40.0



More information about the igt-dev mailing list