Skip to content

Commit a4969dd

Browse files
vsyrjaladanvet
authored andcommitted
drm/omap: Switch omapdrm over to drm_mode_create_rotation_property()
Use the new drm_mode_create_rotation_property() in omapdrm. Cc: dri-devel@lists.freedesktop.org Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Sagar Kamble <sagar.a.kamble@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent c1df5f3 commit a4969dd

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

‎drivers/gpu/drm/omapdrm/omap_plane.c‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -308,19 +308,13 @@ void omap_plane_install_properties(struct drm_plane *plane,
308308
if (priv->has_dmm) {
309309
prop = priv->rotation_prop;
310310
if (!prop) {
311-
const struct drm_prop_enum_list props[] = {
312-
{ DRM_ROTATE_0, "rotate-0" },
313-
{ DRM_ROTATE_90, "rotate-90" },
314-
{ DRM_ROTATE_180, "rotate-180" },
315-
{ DRM_ROTATE_270, "rotate-270" },
316-
{ DRM_REFLECT_X, "reflect-x" },
317-
{ DRM_REFLECT_Y, "reflect-y" },
318-
};
319-
prop = drm_property_create_bitmask(dev, 0, "rotation",
320-
props, ARRAY_SIZE(props),
321-
BIT(DRM_ROTATE_0) | BIT(DRM_ROTATE_90) |
322-
BIT(DRM_ROTATE_180) | BIT(DRM_ROTATE_270) |
323-
BIT(DRM_REFLECT_X) | BIT(DRM_REFLECT_Y));
311+
prop = drm_mode_create_rotation_property(dev,
312+
BIT(DRM_ROTATE_0) |
313+
BIT(DRM_ROTATE_90) |
314+
BIT(DRM_ROTATE_180) |
315+
BIT(DRM_ROTATE_270) |
316+
BIT(DRM_REFLECT_X) |
317+
BIT(DRM_REFLECT_Y));
324318
if (prop == NULL)
325319
return;
326320
priv->rotation_prop = prop;

0 commit comments

Comments
 (0)