From 5346598663e341182b2575fc7294cf210fadc022 Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Wed, 17 Jun 2020 17:38:09 -0400 Subject: [PATCH] disp: msm: sde: don't advertise rotation for virtual planes For existing HW, in-line rotation is only supported on master planes. Remove publishing support for rotate-90 and rotate-270 on all virtual planes. Also, fixup the published support for 180 degree rotation which can be performed on all pipes that have both X & Y axes reflections. Change-Id: Iff248abeefeb2a100ffd833d94b429b47b6d407b Signed-off-by: Steve Cohen --- msm/sde/sde_plane.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/msm/sde/sde_plane.c b/msm/sde/sde_plane.c index 8ab7ab0311..d903e11e76 100644 --- a/msm/sde/sde_plane.c +++ b/msm/sde/sde_plane.c @@ -1646,8 +1646,8 @@ static void sde_plane_rot_install_properties(struct drm_plane *plane, struct sde_mdss_cfg *catalog) { struct sde_plane *psde = to_sde_plane(plane); - unsigned long supported_rotations = DRM_MODE_ROTATE_0 | - DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y; + unsigned int supported_rotations = DRM_MODE_ROTATE_0 | + DRM_MODE_ROTATE_180 | DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y; int ret = 0; if (!plane || !psde) { @@ -1658,9 +1658,8 @@ static void sde_plane_rot_install_properties(struct drm_plane *plane, return; } - if (psde->features & BIT(SDE_SSPP_TRUE_INLINE_ROT)) - supported_rotations |= DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 | - DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270; + if (!psde->is_virtual && psde->features & BIT(SDE_SSPP_TRUE_INLINE_ROT)) + supported_rotations |= DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270; ret = drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0, supported_rotations);