From patchwork Mon Apr 12 13:48:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12198125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B91CC433ED for ; Mon, 12 Apr 2021 13:49:00 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 374B0611AD for ; Mon, 12 Apr 2021 13:49:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 374B0611AD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=+3D64wy2VBbJdN10knGUgfjSOtNOe2+sebLcALd0h3A=; b=R0RkH63DUvoIcJju4dyf/m1a9V MvDODpn5XxNoCrol6762skq7lW3QexbwfCnEFxd2uS6f6oOHf+vorsjhGZUIfSuQnfClXxhn2JyP4 PRK6+6suNY3uc9O0ID3MFAdq4FbKHxJ91IaBTvAu7px25ufE+4s1zBiLwQlR9I9kUw0MUICsHyP7X KZksrvPAWSZG9KOkUImsZl9EPJ9NKqokOkaXEUtVYC728oBDhYXYyILO5G2d+Q9KWmV2CKZZxusuJ UXBQJomCqTEmQ9V9YzN+9vqfwt13b3s1O8PFZyZASBIItir7IILn4g4Ci7amqP88d7upqaqm0TN+0 8/Vteofg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVwvv-006t8h-60; Mon, 12 Apr 2021 13:48:55 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVwvj-006t79-Et for linux-amlogic@desiato.infradead.org; Mon, 12 Apr 2021 13:48:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=gytAL/yvWV0C/C+QEAvYYaxpKrXZ+OUo1TE3J+Md6ys=; b=epkVFErtQeI6zcNsvsk0ZsESbB tJ78GDA40zN5kWzDrwaN8bAO6EHLjzRIIK3Yr95p/tEeuWzv8R1eDdbY+sirL0Piy2JiZodZT5O95 ivcwg52CadOM1fRVtdq76UnvtP6NFIbTfuuH9HlDCjXg4eQ07PRC5an3Jjf4+S9LHGZ8gSikEHRZ7 TJqtsEP/03Z82D3GjdqyjDbw0ecqpmTNQoemRirFnW1L1gc8ne+ySQlqKHQ8UsAbHJS/RzCVTW4Ca gwngkSAw1mg2l0Db80JPvnqRNyHbtZCUr1eVdzdCz9m34+uKi94W057Dj7KkQlRuJvxtw9vd0BJvw zcdUPQPg==; Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVwvf-006HL8-JE for linux-amlogic@lists.infradead.org; Mon, 12 Apr 2021 13:48:42 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5-20020a05600c0245b029011a8273f85eso6931375wmj.1 for ; Mon, 12 Apr 2021 06:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gytAL/yvWV0C/C+QEAvYYaxpKrXZ+OUo1TE3J+Md6ys=; b=D480wbwNLKlAyfVkcA1JsZYy/BJ1qJcaF1+jY+CkOsjJHpVeQgIGm5L3HiubXoP8np qJGDbnjgWUSL2ISmwd0pUK9fe45YRl9xlkHsUWjhnmX4Hd0Pbfj+QruFYy4rTiIOaILP +chfTiiw9AQFz07iI9oPx6sLocK1jrGfb96B3XJluj4PLSSI3v1xBXE4S+YHGhuLwqLm DQCyLZXlIu8fz+SfZAXs9WGaSRZAeJ+twZQ5HdfGYyI8uAzkllHhlM1nQgAzwbTsr2RX XhgR/B7hLRaJC60Dva83D3+9WoS9fwuWdXcINw6EAnGGVMBQVszVzbgaV8Yyegtm+QGW T8+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gytAL/yvWV0C/C+QEAvYYaxpKrXZ+OUo1TE3J+Md6ys=; b=h9UGG5PQc9L/F/n+gjULrVVdJ5q0gAKwo9QEG64V4kqsheql8kKd6KHuRBhzXlzb/v yMbq/PD+SknqPiwqF2HGZX7Wqc8SfC+G52fYa5jFkDMbrWNSNkWHJNL6vnmXNjFnj607 zyMOVKpPkLtuEdTXY8VzwCzYvh1xCLEbnvPQ6+WD0b3SUv1+I7TAAc9a56lsejHuiqbP 6BHjHLAwUhSYszik65zC4gEWbRarwXJXLzocfmbH4iQFXh6jkO4yB9YRFjxauG0tzGxL N7hp2WcfU/TFLUpqP8llNomDKup3xUNVqn6Ls7yNB8Y0dVJs5DMwUTmJjqHVy9SxPsq5 5QDg== X-Gm-Message-State: AOAM533vQrMb4clVsPYCDLFrdQaH1mJKpscjse4+s0SolG8KXLWCdPpk EJ/EieUVhWzdHUwwaZZAXHn2Pw== X-Google-Smtp-Source: ABdhPJxR3exKbfRYuJe7lOTxlwuy+IeGAtvwCGj0DHgKIfnlvq/AQ9U/WYiAArEc4CmHRDj65/ogmg== X-Received: by 2002:a7b:c7d3:: with SMTP id z19mr27332470wmk.139.1618235317683; Mon, 12 Apr 2021 06:48:37 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:4c21:b00e:ff79:bf20]) by smtp.gmail.com with ESMTPSA id m3sm17084423wme.40.2021.04.12.06.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 06:48:37 -0700 (PDT) From: Neil Armstrong To: hverkuil-cisco@xs4all.nl Cc: linux-media@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH] media: meson-ge2d: fix rotation parameters Date: Mon, 12 Apr 2021 15:48:33 +0200 Message-Id: <20210412134833.3467694-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Patch-Hashes: v=1; h=sha256; i=MnWqbtgLNHEO28iGPrU+2fi2Vi4/zgsTM+Wk44sFw6M=; m=LSyi1GIrRi5+cTBT/6Pa7vdOC7D2by2eVWnO1StDcX8=; p=ddQBmT3ON6PerWL2JNhQ08pBoO1RzWVwzA9FpwbnVjk=; g=a5d89b1dd77083c5c89c5f661408958dbf25cbb4 X-Patch-Sig: m=pgp; i=narmstrong@baylibre.com; s=0xA4CFF8AE; b=iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmB0T5MACgkQd9zb2sjISdH0yg/+KQL O6DzQoiEzq7fvnh5Cfi3Ivw46p6oSQO4az4sxBwfpC2O0aTprtUvFzwvrDLdhncJisN3lwXEEIjIx CyPheCQT9fR4OWvEtzAYkMf7V6fS0j0RHzYVpwSkk30gpmLby5DRlfAjm9MWX9LkV++Fehgd6bBBF JSmUc5Y9er2kdQOjqsnTJFxafDRJKqwidz0hb5RKd01SANxhGnnN14S6xV5VR3n0hyZaDG5h5rn8D U2Xa+VvSf5pIrRdCRF7WADadib4MIjVJrw5lf8na3bfN+42w4Chn50NoFMftmToxRRsR/eFaKbH2/ 6xXqTyhvng4j2JZrwn6LZuEX30MJaFJRz4iGQEH80gxM8c9t9S+6G/4m10j9ZDxIYsYKxg6eCnHIa Yeidwea1rkpBloTzmN9R8fu/Wd9i8SxA9BdaPIDYjIieCdwy6JDl8SBHqG6rVHgk8ElqI6zlvObaa aNEt7f1l+1c3baq9JlV2EuTXFrcXtoFOwEMIOSM6GXLNke2yIGDgYLM3q2f8V3mg2SSUblG8KgBRt jkBsDFTdzksBPjq4rCC3eg9R+hi4k5Yzb/mql6gLvmOaA+Ixg7C5vW0ocPCRedgFECSAASz8cgSXh u62cWPv2Luv7oHEpYhwfH9M8ZtDtSmfyt9N+DHmvDQn809dT5HSxLSLuvdHSoNhQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_064839_659149_4CD88A99 X-CRM114-Status: GOOD ( 12.11 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Kevin Hilman --- drivers/media/platform/meson/ge2d/ge2d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c index 153612ca96fc..a1393fefa8ae 100644 --- a/drivers/media/platform/meson/ge2d/ge2d.c +++ b/drivers/media/platform/meson/ge2d/ge2d.c @@ -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;