All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten@mblankhorst.nl>
To: "Intel Graphics Development" <intel-gfx@lists.freedesktop.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: [PATCH] drm/i915: Clear intel_crtc->atomic before updating it.
Date: Mon, 16 Nov 2015 12:49:14 +0100	[thread overview]
Message-ID: <5649C2BA.6080300@mblankhorst.nl> (raw)

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));
+
 		/* 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

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

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=5649C2BA.6080300@mblankhorst.nl \
    --to=maarten@mblankhorst.nl \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /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.