Skip to content

Commit 0211c2a

Browse files
vsyrjalarodrigovivi
authored andcommitted
drm/i915: Skip wm/ddb readout for disabled pipes
The stuff programmed into the wm/ddb registers of planes on disabled pipes doesn't matter. So during readout just leave our software state tracking for those zeroed. This should avoid us trying too hard to clean up after whatever mess the VBIOS/GOP left in there. The actual hardware state will get cleaned up if/when we enable the pipe anyway. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5711 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220617195948.24007-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> (cherry picked from commit b183db8) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 919bef7 commit 0211c2a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6561,7 +6561,10 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
65616561
enum plane_id plane_id;
65626562
u8 slices;
65636563

6564-
skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal);
6564+
memset(&crtc_state->wm.skl.optimal, 0,
6565+
sizeof(crtc_state->wm.skl.optimal));
6566+
if (crtc_state->hw.active)
6567+
skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal);
65656568
crtc_state->wm.skl.raw = crtc_state->wm.skl.optimal;
65666569

65676570
memset(&dbuf_state->ddb[pipe], 0, sizeof(dbuf_state->ddb[pipe]));
@@ -6572,6 +6575,9 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
65726575
struct skl_ddb_entry *ddb_y =
65736576
&crtc_state->wm.skl.plane_ddb_y[plane_id];
65746577

6578+
if (!crtc_state->hw.active)
6579+
continue;
6580+
65756581
skl_ddb_get_hw_plane_state(dev_priv, crtc->pipe,
65766582
plane_id, ddb, ddb_y);
65776583

0 commit comments

Comments
 (0)