[Intel-gfx] [PATCH 01/16] drm/i915: Atomic commit path fix for CRTC properties

Kausal Malladi Kausal.Malladi at intel.com
Wed Jul 15 06:09:25 PDT 2015


From: Matt Roper <matthew.d.roper at intel.com>

The intel_atomic_check() function had some simple testing to make
sure that an atomic update isn't updating more than one CRTC at a time.
The logic assumed that a plane was always being updated, so it figured
out the "nuclear pipe" from the first plane it encountered and just made
sure that all CRTC's matched that nuclear pipe.
But when someone is adding CRTC properties, it's valid to update
just a CRTC property and not have any plane updates in the transaction,
which means the initial 'nuclear_pipe' value was never set.

This patch adds a fix for it and makes sure CRTC properties also get
through atomic commit path.

Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
Signed-off-by: Kausal Malladi <Kausal.Malladi at intel.com>
---
 drivers/gpu/drm/i915/intel_atomic.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index 5c79a31..6ce6c3d 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -80,6 +80,15 @@ int intel_atomic_check(struct drm_device *dev,
 	state->allow_modeset = false;
 	for (i = 0; i < ncrtcs; i++) {
 		struct intel_crtc *crtc = to_intel_crtc(state->crtcs[i]);
+
+		/*
+		 * If we're only updating CRTC properties, we may not have
+		 * established a 'nuclear pipe' yet.  In that case, the first
+		 * CRTC we encounter here should be taken as the 'nuclear
+		 * pipe.'
+		 */
+		if (nuclear_pipe == INVALID_PIPE && crtc)
+			nuclear_pipe = crtc->pipe;
 		if (crtc)
 			memset(&crtc->atomic, 0, sizeof(crtc->atomic));
 		if (crtc && crtc->pipe != nuclear_pipe)
-- 
2.4.5



More information about the Intel-gfx mailing list