[PATCH v1 2/7] lib/i915/intel_fbc: Add fbc supported check based on wa

Mohammed Thasleem mohammed.thasleem at intel.com
Tue Jun 10 17:42:39 UTC 2025


This will check the fbc supported based on given workarunds.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
---
 lib/i915/intel_fbc.c | 21 +++++++++++++++++++++
 lib/i915/intel_fbc.h |  1 +
 2 files changed, 22 insertions(+)

diff --git a/lib/i915/intel_fbc.c b/lib/i915/intel_fbc.c
index a8ded0a59..015523773 100644
--- a/lib/i915/intel_fbc.c
+++ b/lib/i915/intel_fbc.c
@@ -200,3 +200,24 @@ bool intel_fbc_supported_for_psr_mode(int disp_ver, enum psr_mode mode)
 
 	return fbc_supported;
 }
+
+/**
+ * intel_is_fbc_supported
+ *
+ * @fd: fd of the device
+ * @wa_fbc_disabled : WA to be checked
+ *
+ * This function pass the WA to igt_has_intel_wa to check WA on available GTs
+ *
+ * Returns:
+ * true if wa is not equal to 1, and false if wa is equal to 1
+ */
+bool intel_is_fbc_supported(int fd, const char *wa_fbc_disabled)
+{
+	int wa;
+
+	wa = igt_has_intel_wa(fd, wa_fbc_disabled);
+	igt_assert_f(wa >= 0, "WA path not found on GTs\n");
+
+	return wa != 1;
+}
diff --git a/lib/i915/intel_fbc.h b/lib/i915/intel_fbc.h
index fcafe6049..0db1fa14a 100644
--- a/lib/i915/intel_fbc.h
+++ b/lib/i915/intel_fbc.h
@@ -19,5 +19,6 @@ bool intel_fbc_is_enabled(int device, enum pipe pipe, int log_level);
 void intel_fbc_max_plane_size(int fd, uint32_t *width, uint32_t *height);
 bool intel_fbc_plane_size_supported(int device, uint32_t width, uint32_t height);
 bool intel_fbc_supported_for_psr_mode(int disp_ver, enum psr_mode mode);
+bool intel_is_fbc_supported(int fd, const char *wa_fbc_disabled);
 
 #endif
-- 
2.34.1



More information about the igt-dev mailing list