[PATCH 7/7] drm/omap: fix YUV422 90/270 rotation with mirroring

Tomi Valkeinen tomi.valkeinen at ti.com
Wed May 17 07:56:44 UTC 2017


When rotating 90/270 + mirroring with YUV422, the end result will have
adjacent pixels swapped. The problem is that
dispc_ovl_set_rotation_attrs() has wrong rotation values for these
cases.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
---
 drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 80c75e5913cb..7261f87b2a5b 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -1817,13 +1817,13 @@ static void dispc_ovl_set_rotation_attrs(enum omap_plane_id plane, u8 rotation,
 				vidrot = 2;
 				break;
 			case DRM_ROTATE_270:
-				vidrot = 1;
+				vidrot = 3;
 				break;
 			case DRM_ROTATE_180:
 				vidrot = 0;
 				break;
 			case DRM_ROTATE_90:
-				vidrot = 3;
+				vidrot = 1;
 				break;
 			}
 		} else {
-- 
2.7.4



More information about the dri-devel mailing list