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

Jani Nikula jani.nikula at linux.intel.com
Mon Apr 13 04:07:08 PDT 2015


On Fri, 10 Apr 2015, Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com> 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>
> ---
>  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;

They are bools, please use false not 0.

BR,
Jani.

> +	}
>  
>  	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

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list