drm/tegra: plane: Support 180° rotation
authorDmitry Osipenko <digetx@gmail.com>
Wed, 17 Jun 2020 23:40:40 +0000 (02:40 +0300)
committerThierry Reding <treding@nvidia.com>
Fri, 17 Jul 2020 14:06:17 +0000 (16:06 +0200)
Combining horizontal and vertical reflections gives us 180 degrees of
rotation. Both reflection modes are already supported, and thus, we just
need to mark the 180 rotation mode as supported. The 180 rotation mode is
needed for devices like Nexus 7 tablet, which have display panel mounted
upside-down.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c

index 03c75db2ed396b3904d18e9072bf9577d02fcbae..a9159cb456c8eef71e3387656e2d4d2ffc94c5e1 100644 (file)
@@ -816,6 +816,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm,
        err = drm_plane_create_rotation_property(&plane->base,
                                                 DRM_MODE_ROTATE_0,
                                                 DRM_MODE_ROTATE_0 |
+                                                DRM_MODE_ROTATE_180 |
                                                 DRM_MODE_REFLECT_X |
                                                 DRM_MODE_REFLECT_Y);
        if (err < 0)
@@ -1105,6 +1106,7 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm,
        err = drm_plane_create_rotation_property(&plane->base,
                                                 DRM_MODE_ROTATE_0,
                                                 DRM_MODE_ROTATE_0 |
+                                                DRM_MODE_ROTATE_180 |
                                                 DRM_MODE_REFLECT_X |
                                                 DRM_MODE_REFLECT_Y);
        if (err < 0)