All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 12/13] drm/i915: Program BXT_CDCLK_CD2X_PIPE
Date: Thu, 12 May 2016 19:58:42 +0300	[thread overview]
Message-ID: <1463072322.15147.37.camel@intel.com> (raw)
In-Reply-To: <1462995892-32416-13-git-send-email-ville.syrjala@linux.intel.com>

On Wed, 2016-05-11 at 22:44 +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> BXT could change the CD2X divider synchronized with a single pipe.
> So assuming the DE PLL frequency doesn't need to be changed, we could
> change cdclk without shutting off the pipe (when only a single pipe is
> enabled). In the meantime let's configure CDCLK_CTL for non-double
> buffered CD2X update, although it shouldn't really matter as long as
> the selected pipe is disabled when reprogramming the divider.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_reg.h      | 5 +++--
>  drivers/gpu/drm/i915/intel_display.c | 5 +++++
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 54ce0b105956..27a781260d33 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -7566,14 +7566,15 @@ enum skl_disp_power_wells {
>  #define  CDCLK_FREQ_540			(1<<26)
>  #define  CDCLK_FREQ_337_308		(2<<26)
>  #define  CDCLK_FREQ_675_617		(3<<26)
> -#define  CDCLK_FREQ_DECIMAL_MASK	(0x7ff)
> -
> +#define  BXT_CDCLK_CD2X_PIPE(pipe)	((pipe)<<20)
> +#define  BXT_CDCLK_CD2X_PIPE_NONE	BXT_CDCLK_CD2X_PIPE(3)
>  #define  BXT_CDCLK_CD2X_DIV_SEL_MASK	(3<<22)
>  #define  BXT_CDCLK_CD2X_DIV_SEL_1	(0<<22)
>  #define  BXT_CDCLK_CD2X_DIV_SEL_1_5	(1<<22)
>  #define  BXT_CDCLK_CD2X_DIV_SEL_2	(2<<22)
>  #define  BXT_CDCLK_CD2X_DIV_SEL_4	(3<<22)
>  #define  BXT_CDCLK_SSA_PRECHARGE_ENABLE	(1<<16)
> +#define  CDCLK_FREQ_DECIMAL_MASK	(0x7ff)
>  
>  /* LCPLL_CTL */
>  #define LCPLL1_CTL		_MMIO(0x46010)
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 61133fdedc8d..39990bfe47f2 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5434,6 +5434,11 @@ static void broxton_set_cdclk(struct drm_i915_private *dev_priv, int cdclk)
>  			DRM_ERROR("timeout waiting for DE PLL lock\n");
>  
>  		val = I915_READ(CDCLK_CTL);
> +		/*
> +		 * FIXME if only the cd2x divider needs changing, it could be done
> +		 * without shutting off the pipe (if only one pipe is active).
> +		 */
> +		val |= BXT_CDCLK_CD2X_PIPE_NONE;
>  		val &= ~BXT_CDCLK_CD2X_DIV_SEL_MASK;
>  		val |= divider;
>  		/*
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-05-12 16:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 19:44 [PATCH 00/13] drm/i915: cdclk code cleanup ville.syrjala
2016-05-11 19:44 ` [PATCH 01/13] drm/i915: Drop checks for max_pixclk failures in cdclk computation ville.syrjala
2016-05-12 10:02   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 02/13] drm/i915: Extract broadwell_calc_cdclk() ville.syrjala
2016-05-12 10:03   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 03/13] drm/i915: Untangle .fdi_link_train and cdclk vfunc setup ville.syrjala
2016-05-12 10:06   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 04/13] drm/i915: Don't pass dev_priv to broxton_calc_cdclk() ville.syrjala
2016-05-12 10:07   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 05/13] drm/i915: Use ilk_max_pixel_rate() for BXT cdclk calculation ville.syrjala
2016-05-12 10:13   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 06/13] drm/i915: Use skl_cdclk_decimal() on bxt ville.syrjala
2016-05-12 10:23   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 07/13] drm/i915: Remove 10% cdclk guardband on BXT ville.syrjala
2016-05-12 16:42   ` Imre Deak
2016-05-11 19:44 ` [PATCH 08/13] drm/i915: Extract skl_dpll0_disable() ville.syrjala
2016-05-12 10:25   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 09/13] drm/i915: Kill off dead code from skl_dpll0_enable() ville.syrjala
2016-05-12 10:26   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 10/13] drm/i915: s/freq/cdclk/ ville.syrjala
2016-05-12 10:28   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 11/13] drm/i915: s/required_vco/vco/ in skl cdclk code ville.syrjala
2016-05-12 10:29   ` Jani Nikula
2016-05-11 19:44 ` [PATCH 12/13] drm/i915: Program BXT_CDCLK_CD2X_PIPE ville.syrjala
2016-05-12 16:58   ` Imre Deak [this message]
2016-05-11 19:44 ` [PATCH 13/13] drm/i915: Eliminate the CDCLK_CTL RMW on BXT ville.syrjala
2016-05-12 17:05   ` Imre Deak
2016-05-11 20:23 ` ✗ Ro.CI.BAT: failure for drm/i915: cdclk code cleanup Patchwork
2016-05-12 15:16   ` Ville Syrjälä
2016-05-13 18:42 ` [PATCH 00/13] " Ville Syrjälä

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=1463072322.15147.37.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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.