From: Daniel Vetter Subject: Re: [PATCH 08/11] drm/i915: Make i9xx_crtc_clock_get() work for PCH DPLLs Date: Sun, 8 Sep 2013 14:35:00 +0200 Message-ID: <20130908123500.GZ27291@phenom.ffwll.local> References: <1378499348-4281-1-git-send-email-ville.syrjala@linux.intel.com> <1378499348-4281-9-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ea0-f175.google.com (mail-ea0-f175.google.com [209.85.215.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FD27E62D3 for ; Sun, 8 Sep 2013 05:34:48 -0700 (PDT) Received: by mail-ea0-f175.google.com with SMTP id m14so2540045eaj.20 for ; Sun, 08 Sep 2013 05:34:47 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1378499348-4281-9-git-send-email-ville.syrjala@linux.intel.com> 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: ville.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Sep 06, 2013 at 11:29:05PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > Just add the 120MHz reference clock case, and magically the > function appears to be ready to for PCH DPLLs. > = > Now, 120MHz might not always be correct, but we're already using > hardocoded values for other platforms, so the situation isn't > getting much worse. > = > Signed-off-by: Ville Syrj=E4l=E4 > --- > drivers/gpu/drm/i915/intel_display.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/= intel_display.c > index 754de85..d89ea94 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -7372,7 +7372,9 @@ static void i9xx_crtc_clock_get(struct intel_crtc *= crtc, > return; > } > = > - if (IS_PINEVIEW(dev)) > + if (HAS_PCH_SPLIT(dev)) > + i9xx_clock(120000, &clock); Check out ironlake_get_refclk for the more correct answer. You can check for the ssc case by checking for the PLLB_REF_INPUT_SPREADSPECTRUMIN bit in the dpll register. One lofty idea I've had is that we'll track the dpll refclock in the pipe config struct too. Then we can also double-check it when reconstructing clocks. Finally I think the clock reconstruction dance should use the bits in the dpll register and not magic knowledge .... But that's a entire patch series of its own, probably part of the big clock limits computation rework. So for this I'd just add a check for SSC and snatch the SSC clock compuatation from ironlake_get_refclk. Cheers, Daniel > + else if (IS_PINEVIEW(dev)) > pineview_clock(96000, &clock); > else > i9xx_clock(96000, &clock); > -- = > 1.8.1.5 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch