drm: omapdrm: Store the rotation property in dev->mode_config
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 6 Mar 2015 15:16:43 +0000 (17:16 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 12 Jun 2015 19:52:44 +0000 (22:52 +0300)
Rotation is a standard property, store it in
dev->mode_config.rotation_property. While at it, extract the properties
initialization code to a separate function instead of running it for
every plane.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_crtc.c
drivers/gpu/drm/omapdrm/omap_drv.c
drivers/gpu/drm/omapdrm/omap_drv.h
drivers/gpu/drm/omapdrm/omap_plane.c

index f456544..7a64765 100644 (file)
@@ -646,9 +646,7 @@ static int omap_crtc_page_flip_locked(struct drm_crtc *crtc,
 static int omap_crtc_set_property(struct drm_crtc *crtc,
                struct drm_property *property, uint64_t val)
 {
-       struct omap_drm_private *priv = crtc->dev->dev_private;
-
-       if (property == priv->rotation_prop) {
+       if (property == crtc->dev->mode_config.rotation_property) {
                crtc->invert_dimensions =
                                !!(val & ((1LL << DRM_ROTATE_90) | (1LL << DRM_ROTATE_270)));
        }
Simple merge
Simple merge
Simple merge