All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <dev@mblankhorst.nl>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Clear intel_crtc->atomic before updating it.
Date: Mon, 16 Nov 2015 15:15:40 +0200	[thread overview]
Message-ID: <20151116131540.GK4437@intel.com> (raw)
In-Reply-To: <5649C2F5.1050804@mblankhorst.nl>

On Mon, Nov 16, 2015 at 12:50:13PM +0100, Maarten Lankhorst 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.
> 
> Testcase: kms_flip
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: stable@vger.kernel.org #v4.3
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@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));

sizeof(to_intel_crtc(crtc)->atomic) would be better.

This cures a ton of "wait_for_vblank called with a disabled pipe"
type of errors.

Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> +
>  		/* Catch I915_MODE_FLAG_INHERITED */
>  		if (crtc_state->mode.private_flags != crtc->state->mode.private_flags)
>  			crtc_state->mode_changed = true;

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

       reply	other threads:[~2015-11-16 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5649C2F5.1050804@mblankhorst.nl>
2015-11-16 13:15 ` Ville Syrjälä [this message]
2015-11-16 11:49 [PATCH] drm/i915: Clear intel_crtc->atomic before updating it Maarten Lankhorst
2015-11-16 12:00 ` Daniel Stone
2015-11-16 12:35 ` Jani Nikula
2015-11-16 12:41   ` Maarten Lankhorst
2015-11-16 13:19     ` Ville Syrjälä
2015-11-17 14:08       ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151116131540.GK4437@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dev@mblankhorst.nl \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.