Skip to content

Commit 90d5e83

Browse files
vsyrjalarodrigovivi
authored andcommitted
drm/i915: Don't do the WM0->WM1 copy w/a if WM1 is already enabled
Due to a workaround we have to make sure the WM1 watermarks block/lines values are sensible even when WM1 is disabled. To that end we copy those values from WM0. However since we now keep each wm level enabled on a per-plane basis it doesn't seem necessary to do that copy when we already have an enabled WM1 on the current plane. That is, we might be in a situation where another plane can only do WM0 (and thus needs the copy) but the current plane's WM1 is still perfectly valid (ie. fits into the current DDB allocation). Skipping the copy could avoid reprogramming the plane's registers needlessly in some cases. Fixes: a301cb0 ("drm/i915: Keep plane watermarks enabled more aggressively") Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Stanislav Lisovskiy <[email protected]> (cherry picked from commit c580c2d) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 4ec5183 commit 90d5e83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/display/skl_watermark.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,8 @@ skl_crtc_allocate_plane_ddb(struct intel_atomic_state *state,
15871587
skl_check_wm_level(&wm->wm[level], ddb);
15881588

15891589
if (icl_need_wm1_wa(i915, plane_id) &&
1590-
level == 1 && wm->wm[0].enable) {
1590+
level == 1 && !wm->wm[level].enable &&
1591+
wm->wm[0].enable) {
15911592
wm->wm[level].blocks = wm->wm[0].blocks;
15921593
wm->wm[level].lines = wm->wm[0].lines;
15931594
wm->wm[level].ignore_lines = wm->wm[0].ignore_lines;

0 commit comments

Comments
 (0)