intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 06/13] drm/i915: Make pll functions take crtc_state
Date: Wed, 3 Oct 2018 17:11:07 +0300	[thread overview]
Message-ID: <20181003141107.GY9144@intel.com> (raw)
In-Reply-To: <20181003133715.3713-7-maarten.lankhorst@linux.intel.com>

On Wed, Oct 03, 2018 at 03:37:08PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 56784ae26369..36a8d5fb8881 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -1565,14 +1565,15 @@ static void i9xx_enable_pll(struct intel_crtc *crtc,
>  	}
>  }
>  
> -static void i9xx_disable_pll(struct intel_crtc *crtc)
> +static void i9xx_disable_pll(const struct intel_crtc_state *crtc_state)
>  {
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>  	enum pipe pipe = crtc->pipe;
>  
>  	/* Disable DVO 2x clock on both PLLs if necessary */
>  	if (IS_I830(dev_priv) &&
> -	    intel_crtc_has_type(crtc->config, INTEL_OUTPUT_DVO) &&
> +	    intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DVO) &&
>  	    !intel_num_dvo_pipes(dev_priv)) {
>  		I915_WRITE(DPLL(PIPE_B),
>  			   I915_READ(DPLL(PIPE_B)) & ~DPLL_DVO_2X_MODE);
> @@ -4323,10 +4324,10 @@ static void ivb_manual_fdi_link_train(struct intel_crtc *crtc,
>  	DRM_DEBUG_KMS("FDI train done.\n");
>  }

Looks like you missed i9xx_set_pll_dividers() here. I think I saw it in
a later patch though, but maybe move it here?

commit msg...

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

>  
> -static void ironlake_fdi_pll_enable(struct intel_crtc *intel_crtc)
> +static void ironlake_fdi_pll_enable(const struct intel_crtc_state *crtc_state)
>  {
> -	struct drm_device *dev = intel_crtc->base.dev;
> -	struct drm_i915_private *dev_priv = to_i915(dev);
> +	struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->base.crtc);
> +	struct drm_i915_private *dev_priv = to_i915(intel_crtc->base.dev);
>  	int pipe = intel_crtc->pipe;
>  	i915_reg_t reg;
>  	u32 temp;
> @@ -4335,7 +4336,7 @@ static void ironlake_fdi_pll_enable(struct intel_crtc *intel_crtc)
>  	reg = FDI_RX_CTL(pipe);
>  	temp = I915_READ(reg);
>  	temp &= ~(FDI_DP_PORT_WIDTH_MASK | (0x7 << 16));
> -	temp |= FDI_DP_PORT_WIDTH(intel_crtc->config->fdi_lanes);
> +	temp |= FDI_DP_PORT_WIDTH(crtc_state->fdi_lanes);
>  	temp |= (I915_READ(PIPECONF(pipe)) & PIPECONF_BPC_MASK) << 11;
>  	I915_WRITE(reg, temp | FDI_RX_PLL_ENABLE);
>  
> @@ -5614,7 +5615,7 @@ static void ironlake_crtc_enable(struct intel_crtc_state *pipe_config,
>  		/* Note: FDI PLL enabling _must_ be done before we enable the
>  		 * cpu pipes, hence this is separate from all the other fdi/pch
>  		 * enabling. */
> -		ironlake_fdi_pll_enable(intel_crtc);
> +		ironlake_fdi_pll_enable(pipe_config);
>  	} else {
>  		assert_fdi_tx_disabled(dev_priv, pipe);
>  		assert_fdi_rx_disabled(dev_priv, pipe);
> @@ -6211,7 +6212,7 @@ static void i9xx_crtc_disable(struct intel_crtc_state *old_crtc_state,
>  		else if (IS_VALLEYVIEW(dev_priv))
>  			vlv_disable_pll(dev_priv, pipe);
>  		else
> -			i9xx_disable_pll(intel_crtc);
> +			i9xx_disable_pll(old_crtc_state);
>  	}
>  
>  	intel_encoders_post_pll_disable(crtc, old_crtc_state, old_state);
> -- 
> 2.19.0
> 
> _______________________________________________
> 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

  reply	other threads:[~2018-10-03 14:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 13:37 [PATCH 00/13] drm/i915: First cleanup pass to get rid of more crtc->config users Maarten Lankhorst
2018-10-03 13:37 ` [PATCH 01/13] drm/i915: Remove dereferences of crtc->config in set_pipeconf/misc functions Maarten Lankhorst
2018-10-03 13:54   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 02/13] drm/i915: Make panel fitter functions take state Maarten Lankhorst
2018-10-03 13:59   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 03/13] drm/i915: Make intel_set_pipe_timings/src_size take a pointer to crtc_state Maarten Lankhorst
2018-10-03 14:01   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 04/13] drm/i915: Use crtc_state in ironlake_enable_pch_transcoder Maarten Lankhorst
2018-10-03 14:05   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 05/13] drm/i915: Make skl_detach_scalers take crtc_state Maarten Lankhorst
2018-10-03 14:07   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 06/13] drm/i915: Make pll functions " Maarten Lankhorst
2018-10-03 14:11   ` Ville Syrjälä [this message]
2018-10-03 13:37 ` [PATCH 07/13] drm/i915: Make ironlake_pch_transcoder_set_timings " Maarten Lankhorst
2018-10-03 14:11   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 08/13] drm/i915: Make shared dpll functions " Maarten Lankhorst
2018-10-03 14:15   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 09/13] drm/i915: Get rid of crtc->config from icl_pll_to_ddi_pll_sel Maarten Lankhorst
2018-10-03 14:16   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 10/13] drm/i915: Use crtc->state in intel_fbdev_init_bios Maarten Lankhorst
2018-10-03 14:18   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 11/13] drm/i915: Get rid of crtc->config dereference in intel_dp_retrain_link Maarten Lankhorst
2018-10-03 14:21   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 12/13] drm/i915: Get rid of crtc->config in chv_data_lane_soft_reset Maarten Lankhorst
2018-10-03 14:21   ` Ville Syrjälä
2018-10-03 13:37 ` [PATCH 13/13] drm/i915: Get rid of intel_crtc->config in crtc_enable/disable functions Maarten Lankhorst
2018-10-03 14:24   ` Ville Syrjälä
2018-10-03 14:41 ` ✗ Fi.CI.BAT: failure for drm/i915: First cleanup pass to get rid of more crtc->config users Patchwork

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=20181003141107.GY9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).