summaryrefslogtreecommitdiff
path: root/drivers/staging/omapdrm
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2012-09-04 16:36:20 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-04 19:18:10 (GMT)
commit1e0fdfc2080015abf10a940de9a78a2748205f89 (patch)
treeb8e4001a9ef5d9467e9d2631fa16e24a5b12d4aa /drivers/staging/omapdrm
parent4619cdbc6b3fca9f07482095e338c16ee0c6d722 (diff)
downloadlinux-fsl-qoriq-1e0fdfc2080015abf10a940de9a78a2748205f89.tar.xz
staging: drm/omap: invert dimensions on crtc when rotated
If rotated 90 or 270, we need to invert the dimensions used by drm core for calculating if the dimensions of an attached fb are correct. Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/omapdrm')
-rw-r--r--drivers/staging/omapdrm/omap_crtc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c
index 98a10bc..dade3de 100644
--- a/drivers/staging/omapdrm/omap_crtc.c
+++ b/drivers/staging/omapdrm/omap_crtc.c
@@ -195,6 +195,13 @@ static int omap_crtc_set_property(struct drm_crtc *crtc,
struct drm_property *property, uint64_t val)
{
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
+ struct omap_drm_private *priv = crtc->dev->dev_private;
+
+ if (property == priv->rotation_prop) {
+ crtc->invert_dimensions =
+ !!(val & ((1LL << DRM_ROTATE_90) | (1LL << DRM_ROTATE_270)));
+ }
+
return omap_plane_set_property(omap_crtc->plane, property, val);
}