dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: Set crtc->invert_dimensions from the atomic helpers
@ 2015-10-15 13:53 ville.syrjala
  2015-10-15 13:53 ` [PATCH 2/2] drm: Swap w/h when converting the mode to src coordidates for a rotated primary plane ville.syrjala
  2015-10-15 14:29 ` [PATCH 1/2] drm: Set crtc->invert_dimensions from the atomic helpers Daniel Vetter
  0 siblings, 2 replies; 3+ messages in thread
From: ville.syrjala @ 2015-10-15 13:53 UTC (permalink / raw)
  To: dri-devel

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Pull the crtc->invert_dimensions setting from omapdrm into the atomic
helpers so that all drivers will check viewport correctly in setcrtc()
after rotating the primary plane,

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 8 ++++++++
 drivers/gpu/drm/omapdrm/omap_crtc.c | 3 ---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 87a2a44..d0d11dbf 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1272,6 +1272,11 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
 
 		funcs->atomic_flush(crtc, old_crtc_state);
 	}
+
+	for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) {
+		crtc->invert_dimensions = (crtc->primary->state->rotation &
+					   (BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_270)));
+	}
 }
 EXPORT_SYMBOL(drm_atomic_helper_commit_planes);
 
@@ -1330,6 +1335,9 @@ drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_state)
 
 	if (crtc_funcs && crtc_funcs->atomic_flush)
 		crtc_funcs->atomic_flush(crtc, old_crtc_state);
+
+	crtc->invert_dimensions = (crtc->primary->state->rotation &
+				   (BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_270)));
 }
 EXPORT_SYMBOL(drm_atomic_helper_commit_planes_on_crtc);
 
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 9a4ba4f..ad09590 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -412,9 +412,6 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,
 		dispc_mgr_go(omap_crtc->channel);
 		omap_irq_register(crtc->dev, &omap_crtc->vblank_irq);
 	}
-
-	crtc->invert_dimensions = !!(crtc->primary->state->rotation &
-				    (BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_270)));
 }
 
 static int omap_crtc_atomic_set_property(struct drm_crtc *crtc,
-- 
2.4.9

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-15 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 13:53 [PATCH 1/2] drm: Set crtc->invert_dimensions from the atomic helpers ville.syrjala
2015-10-15 13:53 ` [PATCH 2/2] drm: Swap w/h when converting the mode to src coordidates for a rotated primary plane ville.syrjala
2015-10-15 14:29 ` [PATCH 1/2] drm: Set crtc->invert_dimensions from the atomic helpers Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox