[PATCH i-g-t v1 1/5] lib/i915/fbc: fbc psr combo support check helper function
Vinod Govindapillai
vinod.govindapillai at intel.com
Thu Feb 20 12:21:27 UTC 2025
Introduce a function which can check if the PSR and FBC combo
is supported in a display version.
Signed-off-by: Vinod Govindapillai <vinod.govindapillai at intel.com>
---
lib/i915/intel_fbc.c | 18 ++++++++++++++++++
lib/i915/intel_fbc.h | 1 +
2 files changed, 19 insertions(+)
diff --git a/lib/i915/intel_fbc.c b/lib/i915/intel_fbc.c
index 2096bd996..90fe5943c 100644
--- a/lib/i915/intel_fbc.c
+++ b/lib/i915/intel_fbc.c
@@ -154,3 +154,21 @@ bool intel_fbc_plane_size_supported(int fd, uint32_t width, uint32_t height)
return width <= max_w && height <= max_h;
}
+
+/**
+ * intel_fbc_psr_combo_supported
+ *
+ * @fd: fd of the device
+ *
+ * FBC PSR combination support depends on the display version.
+ *
+ * Returns:
+ * true if FBC and PSR can be enabled together in a platform
+ */
+bool intel_fbc_psr_combo_supported(int device)
+{
+ if (intel_display_ver(intel_get_drm_devid(device)) >= 20)
+ return true;
+
+ return false;
+}
diff --git a/lib/i915/intel_fbc.h b/lib/i915/intel_fbc.h
index 5cca5dfd9..0abd18478 100644
--- a/lib/i915/intel_fbc.h
+++ b/lib/i915/intel_fbc.h
@@ -16,5 +16,6 @@ bool intel_fbc_wait_until_enabled(int device, enum pipe pipe);
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_psr_combo_supported(int device);
#endif
--
2.43.0
More information about the igt-dev
mailing list