diff options
| author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-09-26 12:30:52 -0400 |
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-10-21 12:25:47 -0400 |
| commit | 0da88db14034e8b309f1c4188123ca1a02f4b354 (patch) | |
| tree | 51a5237359da11038d16f735f60da1f6218aecdd /drivers/gpu/drm/omapdrm/omap_plane.c | |
| parent | 18391ec0bb4a1ea1ba2b485b8b29ac536d52fa5b (diff) | |
drm/omap: Use per-plane rotation property
The global mode_config.rotation_property is going away, switch over to
per-plane rotation_property.
Not sure I got the annoying crtc rotation_property handling right.
Might work, or migth not.
v2: Drop the BIT()
Don't create rotation property twice for each primary plane
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
[danvet: Add comment per discussion between Tomi&Ville.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1474907460-10717-8-git-send-email-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_plane.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_plane.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 6ddaa5ea4b6b..0ffd5b930ec0 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c | |||
| @@ -211,9 +211,17 @@ void omap_plane_install_properties(struct drm_plane *plane, | |||
| 211 | struct omap_drm_private *priv = dev->dev_private; | 211 | struct omap_drm_private *priv = dev->dev_private; |
| 212 | 212 | ||
| 213 | if (priv->has_dmm) { | 213 | if (priv->has_dmm) { |
| 214 | struct drm_property *prop = dev->mode_config.rotation_property; | 214 | if (!plane->rotation_property) |
| 215 | 215 | drm_plane_create_rotation_property(plane, | |
| 216 | drm_object_attach_property(obj, prop, DRM_ROTATE_0); | 216 | DRM_ROTATE_0, |
| 217 | DRM_ROTATE_0 | DRM_ROTATE_90 | | ||
| 218 | DRM_ROTATE_180 | DRM_ROTATE_270 | | ||
| 219 | DRM_REFLECT_X | DRM_REFLECT_Y); | ||
| 220 | |||
| 221 | /* Attach the rotation property also to the crtc object */ | ||
| 222 | if (plane->rotation_property && obj != &plane->base) | ||
| 223 | drm_object_attach_property(obj, plane->rotation_property, | ||
| 224 | DRM_ROTATE_0); | ||
| 217 | } | 225 | } |
| 218 | 226 | ||
| 219 | drm_object_attach_property(obj, priv->zorder_prop, 0); | 227 | drm_object_attach_property(obj, priv->zorder_prop, 0); |
