]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: meson-ge2d: fix rotation parameters
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 12 Apr 2021 13:48:33 +0000 (15:48 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 15 Apr 2021 11:19:28 +0000 (13:19 +0200)
With these settings, 90deg and 270deg rotation leads to inverted
vertical, fix them to have correct rotation.

Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/meson/ge2d/ge2d.c

index 153612ca96fc17d7f81911db136de63fe29e1e92..a1393fefa8aeab90c8a8a7f47c040c57931330e3 100644 (file)
@@ -757,7 +757,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
 
                if (ctrl->val == 90) {
                        ctx->hflip = 0;
-                       ctx->vflip = 0;
+                       ctx->vflip = 1;
                        ctx->xy_swap = 1;
                } else if (ctrl->val == 180) {
                        ctx->hflip = 1;
@@ -765,7 +765,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl)
                        ctx->xy_swap = 0;
                } else if (ctrl->val == 270) {
                        ctx->hflip = 1;
-                       ctx->vflip = 1;
+                       ctx->vflip = 0;
                        ctx->xy_swap = 1;
                } else {
                        ctx->hflip = 0;