[PATCH v2 23/27] drm/i915: Remove transitional references from intel_plane_atomic_check.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All transitional plane helpers are gone, party!

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_atomic_plane.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index 9af1053ae8aa..6d5ede8a9bf6 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -131,16 +131,16 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
 	if (!crtc)
 		return 0;
 
-	/* FIXME: temporary hack necessary while we still use the plane update
-	 * helper. */
-	if (state->state) {
-		crtc_state =
-			intel_atomic_get_crtc_state(state->state, intel_crtc);
-		if (IS_ERR(crtc_state))
-			return PTR_ERR(crtc_state);
-	} else {
-		crtc_state = intel_crtc->config;
-	}
+	/*
+	 * Normally we could use get_existing_crtc_state, but the initial hw
+	 * readout path only sets plane->crtc, which is not picked up by the
+	 * atomic core. It's forbidden to set state->crtc without a valid
+	 * state->fb, so getting crtc state here is the best we can do..
+	 */
+	crtc_state = intel_atomic_get_crtc_state(state->state, intel_crtc);
+	if (IS_ERR(crtc_state))
+		return PTR_ERR(crtc_state);
+	crtc_state->base.planes_changed = true;
 
 	/*
 	 * The original src/dest coordinates are stored in state->base, but
@@ -189,7 +189,7 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
 	}
 
 	ret = intel_plane->check_plane(plane, crtc_state, intel_state);
-	if (ret || !state->state)
+	if (ret)
 		return ret;
 
 	return intel_plane_atomic_calc_changes(&crtc_state->base, state);
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux