Commit ea0e1ce2 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/arm: Use per-plane rotation property

The global mode_config.rotation_property is going away, switch over to
per-plane rotation_property.

v2: Drop the BIT()

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: default avatarBrian Starkey <brian.starkey@arm.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1474907460-10717-5-git-send-email-ville.syrjala@linux.intel.com
parent d138dd3c
...@@ -254,21 +254,18 @@ int malidp_de_planes_init(struct drm_device *drm) ...@@ -254,21 +254,18 @@ int malidp_de_planes_init(struct drm_device *drm)
if (ret < 0) if (ret < 0)
goto cleanup; goto cleanup;
if (!drm->mode_config.rotation_property) { /* SMART layer can't be rotated */
if (id != DE_SMART) {
unsigned long flags = DRM_ROTATE_0 | unsigned long flags = DRM_ROTATE_0 |
DRM_ROTATE_90 | DRM_ROTATE_90 |
DRM_ROTATE_180 | DRM_ROTATE_180 |
DRM_ROTATE_270 | DRM_ROTATE_270 |
DRM_REFLECT_X | DRM_REFLECT_X |
DRM_REFLECT_Y; DRM_REFLECT_Y;
drm->mode_config.rotation_property = drm_plane_create_rotation_property(&plane->base,
drm_mode_create_rotation_property(drm, flags); DRM_ROTATE_0,
flags);
} }
/* SMART layer can't be rotated */
if (drm->mode_config.rotation_property && (id != DE_SMART))
drm_object_attach_property(&plane->base.base,
drm->mode_config.rotation_property,
DRM_ROTATE_0);
drm_plane_helper_add(&plane->base, drm_plane_helper_add(&plane->base,
&malidp_de_plane_helper_funcs); &malidp_de_plane_helper_funcs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment