mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
drm/i915/display: convert W/As in intel_fbc.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-11-luciano.coelho@intel.com Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
cd09d058c0
commit
305a60de9b
|
|
@ -70,6 +70,8 @@ static bool intel_display_needs_wa_16025573575(struct intel_display *display)
|
|||
bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, const char *name)
|
||||
{
|
||||
switch (wa) {
|
||||
case INTEL_DISPLAY_WA_1409120013:
|
||||
return IS_DISPLAY_VER(display, 11, 12);
|
||||
case INTEL_DISPLAY_WA_1409767108:
|
||||
return (display->platform.alderlake_s ||
|
||||
(display->platform.rocketlake &&
|
||||
|
|
@ -109,6 +111,8 @@ bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa,
|
|||
case INTEL_DISPLAY_WA_16011342517:
|
||||
return display->platform.alderlake_p &&
|
||||
IS_DISPLAY_STEP(display, STEP_A0, STEP_D0);
|
||||
case INTEL_DISPLAY_WA_16011863758:
|
||||
return DISPLAY_VER(display) >= 11;
|
||||
case INTEL_DISPLAY_WA_16023588340:
|
||||
return intel_display_needs_wa_16023588340(display);
|
||||
case INTEL_DISPLAY_WA_16025573575:
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ bool intel_display_needs_wa_16023588340(struct intel_display *display);
|
|||
* number.
|
||||
*/
|
||||
enum intel_display_wa {
|
||||
INTEL_DISPLAY_WA_1409120013,
|
||||
INTEL_DISPLAY_WA_1409767108,
|
||||
INTEL_DISPLAY_WA_13012396614,
|
||||
INTEL_DISPLAY_WA_14010547955,
|
||||
|
|
@ -42,6 +43,7 @@ enum intel_display_wa {
|
|||
INTEL_DISPLAY_WA_15013987218,
|
||||
INTEL_DISPLAY_WA_15018326506,
|
||||
INTEL_DISPLAY_WA_16011342517,
|
||||
INTEL_DISPLAY_WA_16011863758,
|
||||
INTEL_DISPLAY_WA_16023588340,
|
||||
INTEL_DISPLAY_WA_16025573575,
|
||||
INTEL_DISPLAY_WA_22010178259,
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ static unsigned int skl_fbc_min_cfb_stride(struct intel_display *display,
|
|||
* Wa_16011863758: icl+
|
||||
* Avoid some hardware segment address miscalculation.
|
||||
*/
|
||||
if (DISPLAY_VER(display) >= 11)
|
||||
if (intel_display_wa(display, INTEL_DISPLAY_WA_16011863758))
|
||||
stride += 64;
|
||||
|
||||
/*
|
||||
|
|
@ -949,7 +949,7 @@ static void intel_fbc_program_workarounds(struct intel_fbc *fbc)
|
|||
}
|
||||
|
||||
/* Wa_1409120013:icl,jsl,tgl,dg1 */
|
||||
if (IS_DISPLAY_VER(display, 11, 12))
|
||||
if (intel_display_wa(display, INTEL_DISPLAY_WA_1409120013))
|
||||
intel_de_rmw(display, ILK_DPFC_CHICKEN(fbc->id),
|
||||
0, DPFC_CHICKEN_COMP_DUMMY_PIXEL);
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user