From: jsg Date: Fri, 9 Sep 2022 04:42:06 +0000 (+0000) Subject: drm/i915: Skip wm/ddb readout for disabled pipes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f6417410045f64ca962af323ec8fdc3e18493436;p=openbsd drm/i915: Skip wm/ddb readout for disabled pipes From Ville Syrjala 1787ec7dcc3761e040d0cd9896d3a40b4efac4cf in linux 5.15.y/5.15.66 0211c2a0ea600e25db3044daaeff4fe41c3ed6d9 in mainline linux --- diff --git a/sys/dev/pci/drm/i915/intel_pm.c b/sys/dev/pci/drm/i915/intel_pm.c index e678740f614..2b5c74071ce 100644 --- a/sys/dev/pci/drm/i915/intel_pm.c +++ b/sys/dev/pci/drm/i915/intel_pm.c @@ -6640,7 +6640,10 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv) enum plane_id plane_id; u8 slices; - skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal); + memset(&crtc_state->wm.skl.optimal, 0, + sizeof(crtc_state->wm.skl.optimal)); + if (crtc_state->hw.active) + skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal); crtc_state->wm.skl.raw = crtc_state->wm.skl.optimal; memset(&dbuf_state->ddb[pipe], 0, sizeof(dbuf_state->ddb[pipe])); @@ -6651,6 +6654,9 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv) struct skl_ddb_entry *ddb_uv = &crtc_state->wm.skl.plane_ddb_uv[plane_id]; + if (!crtc_state->hw.active) + continue; + skl_ddb_get_hw_plane_state(dev_priv, crtc->pipe, plane_id, ddb_y, ddb_uv);