From: "Lee, Chon Ming" Subject: Re: [PATCH] drm/i915/vlv: reset DPIO on load and resume Date: Fri, 27 Sep 2013 14:11:10 +0800 Message-ID: <20130927061110.GB28800@ubuntu.png.intel.com> References: <1380231554-2678-1-git-send-email-jbarnes@virtuousgeek.org> <20130926215152.GW12663@phenom.ffwll.local> <20130926145811.0665ca56@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 506FFE6DD9 for ; Thu, 26 Sep 2013 23:12:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130926145811.0665ca56@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On 09/26 14:58, Jesse Barnes wrote: > On Thu, 26 Sep 2013 23:51:52 +0200 > Daniel Vetter wrote: > > > On Thu, Sep 26, 2013 at 02:39:14PM -0700, Jesse Barnes wrote: > > > This fixes resume on my test platform, since I think some DPIO bits need > > > recalibration. > > > > > > References: https://bugs.freedesktop.org/show_bug.cgi?id=69166 > > > Signed-off-by: Jesse Barnes > > > --- > > > drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++ > > > 1 file changed, 13 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > > index f52e6d4..320f729 100644 > > > --- a/drivers/gpu/drm/i915/intel_display.c > > > +++ b/drivers/gpu/drm/i915/intel_display.c > > > @@ -1359,6 +1359,17 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv, > > > assert_pch_hdmi_disabled(dev_priv, pipe, PCH_HDMID); > > > } > > > > > > +static void intel_init_dpio(struct drm_device *dev) > > > +{ > > > + struct drm_i915_private *dev_priv = dev->dev_private; > > > + > > > + if (!IS_VALLEYVIEW(dev)) > > > + return; > > > + > > > + /* Reset in case DPIO was stuck across suspend/resume or boot */ > > > + I915_WRITE(DPIO_CTL, I915_READ(DPIO_CTL) | DPIO_RESET); > > > +} > > > + > > > static void vlv_enable_pll(struct intel_crtc *crtc) > > > { > > > struct drm_device *dev = crtc->base.dev; > > > @@ -10279,6 +10290,8 @@ void intel_modeset_init_hw(struct drm_device *dev) > > > { > > > intel_prepare_ddi(dev); > > > > > > + intel_init_dpio(dev); > > > + > > > intel_init_clock_gating(dev); > > > > Can't you just put this into the clock_gate function? I'd like to cut down > > a bit on our general clutter in the setup code since tbh I've completely > > lost the overview of what goes where ... > > Seemed more appropriate for modeset code, but of course it could go > anywhere. > The patch below is doing the same thing, but reset in intel_uncore_sanitize. drm/i915: Send a DPIO cmnreset during driver load or system resume. Same as Jesse patch, it solves the resume issue also. If usnig Jesse patch, I will remove the DPIO reset in intel_uncore_sanitize. > -- > Jesse Barnes, Intel Open Source Technology Center > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx