Skip to content

Commit eeb04fa

Browse files
committed
drm/i915/dg2: Implement WM0 cursor WA for DG2
Bug in the register unit which results in WM1 register used when only WM0 is enabled on cursor. Software workaround is when only WM0 enabled on cursor, copy contents of CUR_WM_0[30:0] (exclude the enable bit) into CUR_WM_1[30:0]. v2: - s/dev_priv/i915/ (Ville Syrjälä) - Removed unneeded brackets (Ville Syrjälä) HSDES: 14012656716 Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Stanislav Lisovskiy <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2052287 commit eeb04fa

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5095,6 +5095,18 @@ skl_check_nv12_wm_level(struct skl_wm_level *wm, struct skl_wm_level *uv_wm,
50955095
}
50965096
}
50975097

5098+
static bool icl_need_wm1_wa(struct drm_i915_private *i915,
5099+
enum plane_id plane_id)
5100+
{
5101+
/*
5102+
* Wa_1408961008:icl, ehl
5103+
* Wa_14012656716:tgl, adl
5104+
* Underruns with WM1+ disabled
5105+
*/
5106+
return DISPLAY_VER(i915) == 11 ||
5107+
(IS_DISPLAY_VER(i915, 12, 13) && plane_id == PLANE_CURSOR);
5108+
}
5109+
50985110
static int
50995111
skl_allocate_plane_ddb(struct intel_atomic_state *state,
51005112
struct intel_crtc *crtc)
@@ -5265,11 +5277,7 @@ skl_allocate_plane_ddb(struct intel_atomic_state *state,
52655277
skl_check_nv12_wm_level(&wm->wm[level], &wm->uv_wm[level],
52665278
total[plane_id], uv_total[plane_id]);
52675279

5268-
/*
5269-
* Wa_1408961008:icl, ehl
5270-
* Underruns with WM1+ disabled
5271-
*/
5272-
if (DISPLAY_VER(dev_priv) == 11 &&
5280+
if (icl_need_wm1_wa(dev_priv, plane_id) &&
52735281
level == 1 && wm->wm[0].enable) {
52745282
wm->wm[level].blocks = wm->wm[0].blocks;
52755283
wm->wm[level].lines = wm->wm[0].lines;

0 commit comments

Comments
 (0)