Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/display: convert W/As in intel_pmdemand.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-14-luciano.coelho@intel.com
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

+8 -3
+2
drivers/gpu/drm/i915/display/intel_display_wa.c
··· 100 100 IS_DISPLAY_STEP(display, STEP_A0, STEP_A2); 101 101 case INTEL_DISPLAY_WA_14014143976: 102 102 return IS_DISPLAY_STEP(display, STEP_E0, STEP_FOREVER); 103 + case INTEL_DISPLAY_WA_14016740474: 104 + return IS_DISPLAY_VERx100_STEP(display, 1400, STEP_A0, STEP_C0); 103 105 case INTEL_DISPLAY_WA_14020863754: 104 106 return DISPLAY_VERx100(display) == 3000 || 105 107 DISPLAY_VERx100(display) == 2000 ||
+1
drivers/gpu/drm/i915/display/intel_display_wa.h
··· 39 39 INTEL_DISPLAY_WA_14011508470, 40 40 INTEL_DISPLAY_WA_14011765242, 41 41 INTEL_DISPLAY_WA_14014143976, 42 + INTEL_DISPLAY_WA_14016740474, 42 43 INTEL_DISPLAY_WA_14020863754, 43 44 INTEL_DISPLAY_WA_14025769978, 44 45 INTEL_DISPLAY_WA_15013987218,
+5 -3
drivers/gpu/drm/i915/display/intel_pmdemand.c
··· 15 15 #include "intel_display_regs.h" 16 16 #include "intel_display_trace.h" 17 17 #include "intel_display_utils.h" 18 + #include "intel_display_wa.h" 18 19 #include "intel_pmdemand.h" 19 20 #include "intel_step.h" 20 21 #include "skl_watermark.h" ··· 130 129 &pmdemand_state->base, 131 130 &intel_pmdemand_funcs); 132 131 133 - if (IS_DISPLAY_VERx100_STEP(display, 1400, STEP_A0, STEP_C0)) 134 - /* Wa_14016740474 */ 135 - intel_de_rmw(display, XELPD_CHICKEN_DCPR_3, 0, DMD_RSP_TIMEOUT_DISABLE); 132 + /* Wa_14016740474 */ 133 + if (intel_display_wa(display, INTEL_DISPLAY_WA_14016740474)) 134 + intel_de_rmw(display, XELPD_CHICKEN_DCPR_3, 0, 135 + DMD_RSP_TIMEOUT_DISABLE); 136 136 137 137 return 0; 138 138 }