[Intel-gfx] [PATCH 03/11] drm/i915: Reset changed flags when duplicating crtc state

Daniel Vetter daniel at ffwll.ch
Fri Apr 10 02:39:23 PDT 2015


On Fri, Apr 10, 2015 at 11:38:32AM +0300, Ander Conselvan de Oliveira wrote:
> Otherwise, once we start doing atomic updates, the values from a
> previous update might be used, leading to unnecessary changes.
> 
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>

Imo better to use the new helpers added in

commit f5e7840b0c4368f8cdbb055188c2a0eef50c3052
Author: Thierry Reding <treding at nvidia.com>
Date:   Wed Jan 28 14:54:32 2015 +0100

    drm/atomic: Add helpers for state-subclassing drivers

Probably best to roll them out for all our state objects.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_atomic.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> index 3903b90..f951782 100644
> --- a/drivers/gpu/drm/i915/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/intel_atomic.c
> @@ -222,8 +222,12 @@ intel_crtc_duplicate_state(struct drm_crtc *crtc)
>  		crtc_state = kmemdup(intel_crtc->config,
>  				     sizeof(*intel_crtc->config), GFP_KERNEL);
>  
> -	if (crtc_state)
> +	if (crtc_state) {
>  		crtc_state->base.crtc = crtc;
> +		crtc_state->base.mode_changed = 0;
> +		crtc_state->base.active_changed = 0;
> +		crtc_state->base.planes_changed = 0;
> +	}
>  
>  	return &crtc_state->base;
>  }
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list