dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: fix plane rotation
@ 2014-04-05 18:33 Grazvydas Ignotas
  2014-04-05 21:45 ` Rob Clark
  0 siblings, 1 reply; 7+ messages in thread
From: Grazvydas Ignotas @ 2014-04-05 18:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Grazvydas Ignotas

Plane rotation with omapdrm is currently broken.
It seems omap_plane_mode_set() expects width and height in screen
coordinates, so pass it like that.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
 drivers/gpu/drm/omapdrm/omap_plane.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index 370580c..5611f15 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -253,6 +253,14 @@ static int omap_plane_update(struct drm_plane *plane,
 
 	drm_framebuffer_reference(fb);
 
+	/* omap_plane_mode_set() takes adjusted src */
+	switch (omap_plane->win.rotation & 0xf) {
+	case BIT(DRM_ROTATE_90):
+	case BIT(DRM_ROTATE_270):
+		swap(src_w, src_h);
+		break;
+	}
+
 	return omap_plane_mode_set(plane, crtc, fb,
 			crtc_x, crtc_y, crtc_w, crtc_h,
 			src_x, src_y, src_w, src_h,
-- 
1.7.9.5

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

end of thread, other threads:[~2014-04-08  5:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-05 18:33 [PATCH] drm/omap: fix plane rotation Grazvydas Ignotas
2014-04-05 21:45 ` Rob Clark
2014-04-07 10:32   ` Grazvydas Ignotas
2014-04-07 17:17     ` Rob Clark
2014-04-07 21:41       ` Grazvydas Ignotas
2014-04-07 22:12         ` Rob Clark
2014-04-08  5:57           ` Tomi Valkeinen

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