diff mbox series

[05/25] drm/i915/xe2: Skip CCS modifiers for Xe2 platforms

Message ID 20240403105123.1327669-6-balasubramani.vivekanandan@intel.com (mailing list archive)
State New, archived
Headers show
Series Enable dislay support for Battlemage | expand

Commit Message

Vivekanandan, Balasubramani April 3, 2024, 10:51 a.m. UTC
Xe2 platforms doesn't support Aux CCS and the Flat CCS is enabled
through PAT. No CCS modifiers required for Xe2 platforms.

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fb.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index 3ea6470d6d92..923e97c3aa6c 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -431,9 +431,17 @@  static bool plane_has_modifier(struct drm_i915_private *i915,
 	 * Separate AuxCCS and Flat CCS modifiers to be run only on platforms
 	 * where supported.
 	 */
-	if (intel_fb_is_ccs_modifier(md->modifier) &&
-	    HAS_FLAT_CCS(i915) != !md->ccs.packed_aux_planes)
-		return false;
+	if (intel_fb_is_ccs_modifier(md->modifier)) {
+		/*
+		 * No CCS modifiers available on Xe2 platforms as they don't
+		 * support Aux CCS and the Flat CCS is enabled via PAT
+		 */
+		if ((DISPLAY_VER(i915) >= 20) || IS_BATTLEMAGE(i915))
+			return false;
+
+		if (HAS_FLAT_CCS(i915) != !md->ccs.packed_aux_planes)
+			return false;
+	}
 
 	return true;
 }