Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: Disable AuxCCS framebuffers if built for Xe
@ 2024-02-28 14:02 Juha-Pekka Heikkila
  2024-02-28 14:04 ` Souza, Jose
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Juha-Pekka Heikkila @ 2024-02-28 14:02 UTC (permalink / raw)
  To: intel-xe, intel-gfx; +Cc: Juha-Pekka Heikkila, Souza, Jose, Jani Nikula

AuxCCS framebuffers don't work on Xe driver hence disable them
from plane capabilities until they are fixed. FlatCCS framebuffers
work and they are left enabled. CCS is left untouched for i915
driver.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/933
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index e941e2e4fd14..860574d04f88 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2295,6 +2295,9 @@ static u8 skl_get_plane_caps(struct drm_i915_private *i915,
 	if (HAS_4TILE(i915))
 		caps |= INTEL_PLANE_CAP_TILING_4;
 
+	if (!IS_ENABLED(I915) && !HAS_FLAT_CCS(i915))
+		return caps;
+
 	if (skl_plane_has_rc_ccs(i915, pipe, plane_id)) {
 		caps |= INTEL_PLANE_CAP_CCS_RC;
 		if (DISPLAY_VER(i915) >= 12)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread
* [PATCH] drm/i915/display: Disable AuxCCS framebuffers if built for Xe
@ 2024-02-26 20:36 Juha-Pekka Heikkila
  2024-02-27  8:57 ` Jani Nikula
  0 siblings, 1 reply; 19+ messages in thread
From: Juha-Pekka Heikkila @ 2024-02-26 20:36 UTC (permalink / raw)
  To: intel-xe, intel-gfx
  Cc: Juha-Pekka Heikkila, Souza, Jose, Jani Nikula,
	Ville Syrjälä

AuxCCS framebuffers don't work on Xe driver hence disable them
from plane capabilities until they are fixed. FlatCCS framebuffers
work and they are left enabled. CCS is left untouched for i915
driver.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/933
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
Let's try adding those ifdefs as IS_ENABLED(I915) will result in
warnings from checkpatch and there was wishes not to break
universal plane into smaller parts. IS_ENABLED(CONFIG_I915) is
always true when building both Xe and i915.

 .../gpu/drm/i915/display/skl_universal_plane.c  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index e941e2e4fd14..7e0a7283d01d 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2283,6 +2283,15 @@ static bool gen12_plane_has_mc_ccs(struct drm_i915_private *i915,
 	return plane_id < PLANE_SPRITE4;
 }
 
+static bool running_on_i915(void)
+{
+#ifdef I915
+	return true;
+#else
+	return false;
+#endif
+}
+
 static u8 skl_get_plane_caps(struct drm_i915_private *i915,
 			     enum pipe pipe, enum plane_id plane_id)
 {
@@ -2295,6 +2304,14 @@ static u8 skl_get_plane_caps(struct drm_i915_private *i915,
 	if (HAS_4TILE(i915))
 		caps |= INTEL_PLANE_CAP_TILING_4;
 
+	/*
+	 * FIXME: Below if(running_on_i915()..) is because Xe driver
+	 * can't use AuxCCS framebuffers. Once they are fixed this need to be
+	 * removed.
+	 */
+	if (!running_on_i915() && !HAS_FLAT_CCS(i915))
+		return caps;
+
 	if (skl_plane_has_rc_ccs(i915, pipe, plane_id)) {
 		caps |= INTEL_PLANE_CAP_CCS_RC;
 		if (DISPLAY_VER(i915) >= 12)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-01-29 15:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 14:02 [PATCH] drm/i915/display: Disable AuxCCS framebuffers if built for Xe Juha-Pekka Heikkila
2024-02-28 14:04 ` Souza, Jose
2024-02-29 16:44   ` Souza, Jose
2024-02-29 17:36     ` Souza, Jose
2024-02-28 14:07 ` ✓ CI.Patch_applied: success for drm/i915/display: Disable AuxCCS framebuffers if built for Xe (rev2) Patchwork
2024-02-28 14:07 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-28 14:08 ` ✓ CI.KUnit: success " Patchwork
2024-02-28 14:26 ` ✓ CI.Build: " Patchwork
2024-02-28 14:27 ` ✓ CI.Hooks: " Patchwork
2024-02-28 14:28 ` ✗ CI.checksparse: warning " Patchwork
2024-02-28 15:03 ` ✓ CI.BAT: success " Patchwork
2024-03-05 16:44 ` [PATCH] drm/i915/display: Disable AuxCCS framebuffers if built for Xe Jani Nikula
2025-01-28 13:08   ` Tvrtko Ursulin
2025-01-28 15:55     ` Juha-Pekka Heikkilä
2025-01-29  8:44       ` Tvrtko Ursulin
2025-01-29 15:20         ` Juha-Pekka Heikkilä
2024-03-06 13:57 ` Souza, Jose
  -- strict thread matches above, loose matches on Subject: below --
2024-02-26 20:36 Juha-Pekka Heikkila
2024-02-27  8:57 ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox