Re: [PATCH 05/10] drm/i915: Pass crtc_state to update_scanline_offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 11, 2018 at 12:04:52PM +0200, Maarten Lankhorst wrote:
> No need to look at crtc->config when we have crtc_state in the caller.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 7812fab31646..eaf522ef2927 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12127,8 +12127,9 @@ intel_modeset_verify_disabled(struct drm_device *dev,
>  	verify_disabled_dpll_state(dev);
>  }
>  
> -static void update_scanline_offset(struct intel_crtc *crtc)
> +static void update_scanline_offset(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);
>  
>  	/*
> @@ -12159,7 +12160,7 @@ static void update_scanline_offset(struct intel_crtc *crtc)
>  	 * answer that's slightly in the future.
>  	 */
>  	if (IS_GEN2(dev_priv)) {
> -		const struct drm_display_mode *adjusted_mode = &crtc->config->base.adjusted_mode;
> +		const struct drm_display_mode *adjusted_mode = &crtc_state->base.adjusted_mode;
>  		int vtotal;
>  
>  		vtotal = adjusted_mode->crtc_vtotal;
> @@ -12168,7 +12169,7 @@ static void update_scanline_offset(struct intel_crtc *crtc)
>  
>  		crtc->scanline_offset = vtotal - 1;
>  	} else if (HAS_DDI(dev_priv) &&
> -		   intel_crtc_has_type(crtc->config, INTEL_OUTPUT_HDMI)) {
> +		   intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) {
>  		crtc->scanline_offset = 2;
>  	} else
>  		crtc->scanline_offset = 1;
> @@ -12522,7 +12523,7 @@ static void intel_update_crtc(struct drm_crtc *crtc,
>  						 to_intel_plane(crtc->primary));
>  
>  	if (modeset) {
> -		update_scanline_offset(intel_crtc);
> +		update_scanline_offset(pipe_config);
>  		dev_priv->display.crtc_enable(pipe_config, state);
>  
>  		/* vblanks work again, re-enable pipe CRC. */
> @@ -15868,7 +15869,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
>  
>  			drm_calc_timestamping_constants(&crtc->base,
>  							&crtc_state->base.adjusted_mode);
> -			update_scanline_offset(crtc);
> +			update_scanline_offset(crtc_state);
>  		}
>  
>  		dev_priv->min_cdclk[crtc->pipe] = min_cdclk;
> -- 
> 2.19.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux