[Intel-gfx] [PATCH] drm/i915: Clear intel_crtc->atomic before updating it.

Jani Nikula jani.nikula at linux.intel.com
Mon Nov 16 04:35:17 PST 2015


On Mon, 16 Nov 2015, Maarten Lankhorst <maarten at mblankhorst.nl> wrote:
> If an atomic update fails intel_crtc->atomic may have have some values left
> from the last atomic check. One example is atomic->wait_for_vblank,
> which results in spurious errors in kms_flip.

Please add the "spurious errors" you see in the commit message, so we
have a better chance at mapping bug reports to fixes. We used to be good
at this, but we seem to have lost the habit lately.

BR,
Jani.


>
> Testcase: kms_flip
> Reported-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: stable at vger.kernel.org #v4.3
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b5f7493213b7..b9539b14fe0d 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13141,6 +13141,9 @@ static int intel_atomic_check(struct drm_device *dev,
>  		struct intel_crtc_state *pipe_config =
>  			to_intel_crtc_state(crtc_state);
>  
> +		memset(&to_intel_crtc(crtc)->atomic, 0,
> +		       sizeof(struct intel_crtc_atomic_commit));
> +
>  		/* Catch I915_MODE_FLAG_INHERITED */
>  		if (crtc_state->mode.private_flags != crtc->state->mode.private_flags)
>  			crtc_state->mode_changed = true;
>
> _______________________________________________
> 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