diff options
| author | Luca Coelho <luciano.coelho@intel.com> | 2026-03-05 12:59:14 +0300 |
|---|---|---|
| committer | Luca Coelho <luciano.coelho@intel.com> | 2026-03-09 13:32:48 +0300 |
| commit | 700f1c1b3be7897cd3d265a2f3f2ebe200fb2700 (patch) | |
| tree | 6908b9d7a8117af0078fa7f8abd1cf78051678c7 | |
| parent | 305a60de9b16f310e8e50d1405108609f6e6ec2b (diff) | |
| download | linux-700f1c1b3be7897cd3d265a2f3f2ebe200fb2700.tar.xz | |
drm/i915/display: convert W/As in intel_flipq.c to new framework
Convert the low-hanging fruits of workaround checks to the workaround
framework. Instead of having display structure checks for the
workarounds all over, concentrate the checks in intel_display_wa.c.
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260305100100.332956-12-luciano.coelho@intel.com
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
| -rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_wa.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_wa.h | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/display/intel_flipq.c | 13 |
3 files changed, 8 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.c b/drivers/gpu/drm/i915/display/intel_display_wa.c index 0f449ea8e1bb..81be1e875c07 100644 --- a/drivers/gpu/drm/i915/display/intel_display_wa.c +++ b/drivers/gpu/drm/i915/display/intel_display_wa.c @@ -117,6 +117,10 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, return intel_display_needs_wa_16023588340(display); case INTEL_DISPLAY_WA_16025573575: return intel_display_needs_wa_16025573575(display); + case INTEL_DISPLAY_WA_18034343758: + return DISPLAY_VER(display) == 20 || + (display->platform.pantherlake && + IS_DISPLAY_STEP(display, STEP_A0, STEP_B0)); case INTEL_DISPLAY_WA_22010178259: return DISPLAY_VER(display) == 12; case INTEL_DISPLAY_WA_22011320316: diff --git a/drivers/gpu/drm/i915/display/intel_display_wa.h b/drivers/gpu/drm/i915/display/intel_display_wa.h index 373cbbb93873..68d67b9b0263 100644 --- a/drivers/gpu/drm/i915/display/intel_display_wa.h +++ b/drivers/gpu/drm/i915/display/intel_display_wa.h @@ -46,6 +46,7 @@ enum intel_display_wa { INTEL_DISPLAY_WA_16011863758, INTEL_DISPLAY_WA_16023588340, INTEL_DISPLAY_WA_16025573575, + INTEL_DISPLAY_WA_18034343758, INTEL_DISPLAY_WA_22010178259, INTEL_DISPLAY_WA_22011320316, INTEL_DISPLAY_WA_22012358565, diff --git a/drivers/gpu/drm/i915/display/intel_flipq.c b/drivers/gpu/drm/i915/display/intel_flipq.c index 1e9550cb66a3..253dc2e96d2d 100644 --- a/drivers/gpu/drm/i915/display/intel_flipq.c +++ b/drivers/gpu/drm/i915/display/intel_flipq.c @@ -12,6 +12,7 @@ #include "intel_display_core.h" #include "intel_display_types.h" #include "intel_display_utils.h" +#include "intel_display_wa.h" #include "intel_dmc.h" #include "intel_dmc_regs.h" #include "intel_dsb.h" @@ -447,19 +448,11 @@ void intel_flipq_add(struct intel_crtc *crtc, intel_flipq_sw_dmc_wake(crtc); } -/* Wa_18034343758 */ -static bool need_dmc_halt_wa(struct intel_display *display) -{ - return DISPLAY_VER(display) == 20 || - (display->platform.pantherlake && - IS_DISPLAY_STEP(display, STEP_A0, STEP_B0)); -} - void intel_flipq_wait_dmc_halt(struct intel_dsb *dsb, struct intel_crtc *crtc) { struct intel_display *display = to_intel_display(crtc); - if (need_dmc_halt_wa(display)) + if (intel_display_wa(display, INTEL_DISPLAY_WA_18034343758)) intel_dsb_wait_usec(dsb, 2); } @@ -467,6 +460,6 @@ void intel_flipq_unhalt_dmc(struct intel_dsb *dsb, struct intel_crtc *crtc) { struct intel_display *display = to_intel_display(crtc); - if (need_dmc_halt_wa(display)) + if (intel_display_wa(display, INTEL_DISPLAY_WA_18034343758)) intel_dsb_reg_write(dsb, PIPEDMC_CTL(crtc->pipe), 0); } |
