[Intel-gfx] [PATCH 4/9] drm/i915: Use intel_crtc_state in sanitize_watermarks() too

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Jun 24 15:57:12 UTC 2019


On Thu, Jun 20, 2019 at 11:46:08PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index a518d74f898f..baa0e1957ffe 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -15738,8 +15738,8 @@ static void sanitize_watermarks(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  	struct drm_atomic_state *state;
>  	struct intel_atomic_state *intel_state;
> -	struct drm_crtc *crtc;
> -	struct drm_crtc_state *cstate;
> +	struct intel_crtc *crtc;
> +	struct intel_crtc_state *cstate;

s/cstate/crtc_state/ might be good here too.

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

>  	struct drm_modeset_acquire_ctx ctx;
>  	int ret;
>  	int i;
> @@ -15794,13 +15794,11 @@ static void sanitize_watermarks(struct drm_device *dev)
>  	}
>  
>  	/* Write calculated watermark values back */
> -	for_each_new_crtc_in_state(state, crtc, cstate, i) {
> -		struct intel_crtc_state *cs = to_intel_crtc_state(cstate);
> -
> -		cs->wm.need_postvbl_update = true;
> -		dev_priv->display.optimize_watermarks(intel_state, cs);
> +	for_each_new_intel_crtc_in_state(intel_state, crtc, cstate, i) {
> +		cstate->wm.need_postvbl_update = true;
> +		dev_priv->display.optimize_watermarks(intel_state, cstate);
>  
> -		to_intel_crtc_state(crtc->state)->wm = cs->wm;
> +		to_intel_crtc_state(crtc->base.state)->wm = cstate->wm;
>  	}
>  
>  put_state:
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel


More information about the Intel-gfx mailing list