drm/mediatek: Support 180 degree rotation
authorSean Paul <seanpaul@chromium.org>
Tue, 5 Nov 2019 21:10:24 +0000 (16:10 -0500)
committerCK Hu <ck.hu@mediatek.com>
Wed, 6 Nov 2019 08:00:45 +0000 (16:00 +0800)
Now that we support both reflections, we can expose 180 degree rotation
and rely on the simplify routine to convert that into REFLECT_X |
REFLECT_Y

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
drivers/gpu/drm/mediatek/mtk_disp_ovl.c

index f4c4d3fedc5fff93fd5ef646f525873fbab35772..4a55bb6e221329eb4183b48d7c0720d72f977984 100644 (file)
@@ -143,8 +143,8 @@ static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp)
 
 static unsigned int mtk_ovl_supported_rotations(struct mtk_ddp_comp *comp)
 {
-       return DRM_MODE_ROTATE_0 | DRM_MODE_REFLECT_Y |
-              DRM_MODE_REFLECT_X;
+       return DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180 |
+              DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y;
 }
 
 static int mtk_ovl_layer_check(struct mtk_ddp_comp *comp, unsigned int idx,