]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/i915: disable fbc due to Wa_16023588340
authorMatthew Auld <matthew.auld@intel.com>
Wed, 3 Jul 2024 12:43:39 +0000 (13:43 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Fri, 5 Jul 2024 08:53:14 +0000 (09:53 +0100)
On BMG-G21 we need to disable fbc due to complications around the WA.

v2:
 - Try to handle with i915_drv.h and compat layer. (Rodrigo)
v3:
 - For simplicity retreat back to the original design for now.
 - Drop the extra \ from the Makefile (Jani)

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Vinod Govindapillai <vinod.govindapillai@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240703124338.208220-4-matthew.auld@intel.com
drivers/gpu/drm/i915/display/intel_display_wa.h
drivers/gpu/drm/i915/display/intel_fbc.c
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/display/xe_display_wa.c [new file with mode: 0644]

index 63201d09852c56dc5477d03d5ac48edfdfbe63fb..be644ab6ae00612aa6b677618568cdcabe9d74e5 100644 (file)
@@ -6,8 +6,16 @@
 #ifndef __INTEL_DISPLAY_WA_H__
 #define __INTEL_DISPLAY_WA_H__
 
+#include <linux/types.h>
+
 struct drm_i915_private;
 
 void intel_display_wa_apply(struct drm_i915_private *i915);
 
+#ifdef I915
+static inline bool intel_display_needs_wa_16023588340(struct drm_i915_private *i915) { return false; }
+#else
+bool intel_display_needs_wa_16023588340(struct drm_i915_private *i915);
+#endif
+
 #endif
index 67116c9f14643be159379aff75924ea5c28bfd53..8488f82143a40c06535275636d592e830d1edd8f 100644 (file)
@@ -56,6 +56,7 @@
 #include "intel_display_device.h"
 #include "intel_display_trace.h"
 #include "intel_display_types.h"
+#include "intel_display_wa.h"
 #include "intel_fbc.h"
 #include "intel_fbc_regs.h"
 #include "intel_frontbuffer.h"
@@ -1237,6 +1238,11 @@ static int intel_fbc_check_plane(struct intel_atomic_state *state,
                return 0;
        }
 
+       if (intel_display_needs_wa_16023588340(i915)) {
+               plane_state->no_fbc_reason = "Wa_16023588340";
+               return 0;
+       }
+
        /* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
        if (i915_vtd_active(i915) && (IS_SKYLAKE(i915) || IS_BROXTON(i915))) {
                plane_state->no_fbc_reason = "VT-d enabled";
index e97c9da451b36cfd93dcbf04a489ebcc839dabb2..0eb0acc4f198bd1269e0171aab2f549b3e828382 100644 (file)
@@ -36,7 +36,8 @@ uses_generated_oob := \
        $(obj)/xe_ring_ops.o \
        $(obj)/xe_vm.o \
        $(obj)/xe_wa.o \
-       $(obj)/xe_ttm_stolen_mgr.o
+       $(obj)/xe_ttm_stolen_mgr.o \
+       $(obj)/display/xe_display_wa.o
 
 $(uses_generated_oob): $(generated_oob)
 
@@ -194,6 +195,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
        display/xe_display.o \
        display/xe_display_misc.o \
        display/xe_display_rps.o \
+       display/xe_display_wa.o \
        display/xe_dsb_buffer.o \
        display/xe_fb_pin.o \
        display/xe_hdcp_gsc.o \
diff --git a/drivers/gpu/drm/xe/display/xe_display_wa.c b/drivers/gpu/drm/xe/display/xe_display_wa.c
new file mode 100644 (file)
index 0000000..68e3d19
--- /dev/null
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2024 Intel Corporation
+ */
+
+#include "intel_display_wa.h"
+
+#include "xe_device.h"
+#include "xe_wa.h"
+
+#include <generated/xe_wa_oob.h>
+
+bool intel_display_needs_wa_16023588340(struct drm_i915_private *i915)
+{
+       return XE_WA(xe_root_mmio_gt(i915), 16023588340);
+}