提交 37d9078b 编写于 作者: M Matt Roper 提交者: Daniel Vetter

drm/i915: Drop redundant watermark programming

In commit

        commit e4ca0612
        Author: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
        Date:   Wed Jul 8 15:31:52 2015 +0200

            drm/i915: Don't forget to mark crtc as inactive after disable

we added extra watermark updates to all of the .crtc_disable()
entrypoints to avoid problems problems with system resume on SKL.  Those
disable entrypoints are currently called in just two places in the
driver: intel_atomic_commit (i.e., during a modeset) and
intel_crtc_disable_noatomic (which is called during hardware readout).
It seems that this extra watermark recalculation should only be
important in the latter case (which happens during a resume operation);
the former case should always have appropriate watermark programming
happening at other points in the modeset sequence.

Let's move the watermark update out of the .crtc_disable() entrypoints
and place it directly in intel_crtc_disable_noatomic() so that it only
happens on S3 resume and not during a regular modeset (since the
existing watermark handling should properly update watermarks during
normal atomic commits).

Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 d8135109
...@@ -5115,9 +5115,6 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) ...@@ -5115,9 +5115,6 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
ironlake_fdi_pll_disable(intel_crtc); ironlake_fdi_pll_disable(intel_crtc);
} }
intel_crtc->active = false;
intel_update_watermarks(crtc);
} }
static void haswell_crtc_disable(struct drm_crtc *crtc) static void haswell_crtc_disable(struct drm_crtc *crtc)
...@@ -5161,9 +5158,6 @@ static void haswell_crtc_disable(struct drm_crtc *crtc) ...@@ -5161,9 +5158,6 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
for_each_encoder_on_crtc(dev, crtc, encoder) for_each_encoder_on_crtc(dev, crtc, encoder)
if (encoder->post_disable) if (encoder->post_disable)
encoder->post_disable(encoder); encoder->post_disable(encoder);
intel_crtc->active = false;
intel_update_watermarks(crtc);
} }
static void i9xx_pfit_enable(struct intel_crtc *crtc) static void i9xx_pfit_enable(struct intel_crtc *crtc)
...@@ -6254,9 +6248,6 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc) ...@@ -6254,9 +6248,6 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
if (!IS_GEN2(dev)) if (!IS_GEN2(dev))
intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false); intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
intel_crtc->active = false;
intel_update_watermarks(crtc);
} }
static void intel_crtc_disable_noatomic(struct drm_crtc *crtc) static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
...@@ -6276,6 +6267,8 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc) ...@@ -6276,6 +6267,8 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
intel_crtc_disable_planes(crtc, crtc->state->plane_mask); intel_crtc_disable_planes(crtc, crtc->state->plane_mask);
dev_priv->display.crtc_disable(crtc); dev_priv->display.crtc_disable(crtc);
intel_crtc->active = false;
intel_update_watermarks(crtc);
intel_disable_shared_dpll(intel_crtc); intel_disable_shared_dpll(intel_crtc);
domains = intel_crtc->enabled_power_domains; domains = intel_crtc->enabled_power_domains;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册