diff options
| author | Grazvydas Ignotas <[email protected]> | 2014-04-05 18:33:51 +0000 |
|---|---|---|
| committer | Tomi Valkeinen <[email protected]> | 2014-04-14 09:34:14 +0000 |
| commit | d4586604acbd2e58921e0363533b9797b0235275 (patch) | |
| tree | 05450bb885951cf3b6d32750ffbed494b4d96505 /drivers/gpu/drm/omapdrm/omap_plane.c | |
| parent | drm/omap: fix enabling/disabling of video pipeline (diff) | |
| download | kernel-d4586604acbd2e58921e0363533b9797b0235275.tar.gz kernel-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 <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_plane.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 8 |
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, |
