All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/tgl: Use refclk/2 as bypass frequency
Date: Fri, 6 Sep 2019 14:36:49 +0300	[thread overview]
Message-ID: <20190906113649.GR7482@intel.com> (raw)
In-Reply-To: <20190905181337.23727-1-matthew.d.roper@intel.com>

On Thu, Sep 05, 2019 at 11:13:37AM -0700, Matt Roper wrote:
> Unlike gen11, which always ran at 50MHz when the cdclk PLL was disabled,
> TGL runs at refclk/2.  The 50MHz croclk/2 is only used by hardware
> during some power state transitions.
> 
> Bspec: 49201
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_cdclk.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
> index 76f11d465e91..d3e56628af70 100644
> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
> @@ -1855,8 +1855,6 @@ static void icl_get_cdclk(struct drm_i915_private *dev_priv,
>  	u32 val;
>  	int div;
>  
> -	cdclk_state->bypass = 50000;
> -
>  	val = I915_READ(SKL_DSSM);
>  	switch (val & ICL_DSSM_CDCLK_PLL_REFCLK_MASK) {
>  	default:
> @@ -1873,6 +1871,11 @@ static void icl_get_cdclk(struct drm_i915_private *dev_priv,
>  		break;
>  	}
>  
> +	if (INTEL_GEN(dev_priv) >= 12)
> +		cdclk_state->bypass = cdclk_state->ref / 2;
> +	else
> +		cdclk_state->bypass = 50000;

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

PS. I'd still like to see a icl_cdclk_pll_update() so I wouldn't have to
scratch my head why this looks so different to bxt/cnl code.

> +
>  	val = I915_READ(BXT_DE_PLL_ENABLE);
>  	if ((val & BXT_DE_PLL_PLL_ENABLE) == 0 ||
>  	    (val & BXT_DE_PLL_LOCK) == 0) {
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-09-06 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 18:13 [PATCH] drm/i915/tgl: Use refclk/2 as bypass frequency Matt Roper
2019-09-05 18:54 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-09-05 23:07 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-06 11:36 ` Ville Syrjälä [this message]
2019-09-06 15:45   ` [PATCH] " Matt Roper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190906113649.GR7482@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.