diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-09-26 12:30:49 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-10-21 12:24:04 -0400 |
commit | ea0e1ce20f736ee7e9209fec2f78880a06056890 (patch) | |
tree | 1998ea0e4f4fff93cd44abd18c01e35df840a87f | |
parent | d138dd3c0c70979215f3184cf36f95875e37932e (diff) |
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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1474907460-10717-5-git-send-email-ville.syrjala@linux.intel.com
-rw-r--r-- | drivers/gpu/drm/arm/malidp_planes.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 82c193e5e0d6..abaca03b9d36 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c | |||
@@ -254,21 +254,18 @@ int malidp_de_planes_init(struct drm_device *drm) | |||
254 | if (ret < 0) | 254 | if (ret < 0) |
255 | goto cleanup; | 255 | goto cleanup; |
256 | 256 | ||
257 | if (!drm->mode_config.rotation_property) { | 257 | /* SMART layer can't be rotated */ |
258 | if (id != DE_SMART) { | ||
258 | unsigned long flags = DRM_ROTATE_0 | | 259 | unsigned long flags = DRM_ROTATE_0 | |
259 | DRM_ROTATE_90 | | 260 | DRM_ROTATE_90 | |
260 | DRM_ROTATE_180 | | 261 | DRM_ROTATE_180 | |
261 | DRM_ROTATE_270 | | 262 | DRM_ROTATE_270 | |
262 | DRM_REFLECT_X | | 263 | DRM_REFLECT_X | |
263 | DRM_REFLECT_Y; | 264 | DRM_REFLECT_Y; |
264 | drm->mode_config.rotation_property = | 265 | drm_plane_create_rotation_property(&plane->base, |
265 | drm_mode_create_rotation_property(drm, flags); | 266 | DRM_ROTATE_0, |
267 | flags); | ||
266 | } | 268 | } |
267 | /* SMART layer can't be rotated */ | ||
268 | if (drm->mode_config.rotation_property && (id != DE_SMART)) | ||
269 | drm_object_attach_property(&plane->base.base, | ||
270 | drm->mode_config.rotation_property, | ||
271 | DRM_ROTATE_0); | ||
272 | 269 | ||
273 | drm_plane_helper_add(&plane->base, | 270 | drm_plane_helper_add(&plane->base, |
274 | &malidp_de_plane_helper_funcs); | 271 | &malidp_de_plane_helper_funcs); |