summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2014-04-05 21:33:51 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-04-14 12:34:14 +0300
commitd4586604acbd2e58921e0363533b9797b0235275 (patch)
tree05450bb885951cf3b6d32750ffbed494b4d96505 /drivers/gpu
parent506096a113832239ce763d20fab8e94f76d56266 (diff)
downloadlinux-d4586604acbd2e58921e0363533b9797b0235275.tar.gz
linux-d4586604acbd2e58921e0363533b9797b0235275.tar.bz2
linux-d4586604acbd2e58921e0363533b9797b0235275.zip
drm/omap: fix plane rotation
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. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_plane.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index 046d5e660c04..df1725247cca 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -246,6 +246,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,