Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6368864pxv; Thu, 29 Jul 2021 12:50:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZw8ISlPLCQyQ4pt4LWii2BNh0akuxkYOrXA4YBTs3WIDXD+jNPJpVLXO4LYcRVdfsrrgx X-Received: by 2002:a05:6638:41a7:: with SMTP id az39mr5851963jab.52.1627588236033; Thu, 29 Jul 2021 12:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627588236; cv=none; d=google.com; s=arc-20160816; b=p/xZX1Fzqo0Sw9HKL1ZXsUxh7O0fw+GqVkB5Yj8Zt/Kk3PAwtaB4g5ZEqwgSe8TZ/G go2aPBw/aA5cc1g5zIBP4Pmo7amJix1pbO3+QSNw5nw+sjYSCJ3aif+hr8ZOZTviruwR neOsRCEMhvZ9kHuvFmPf4kBBZNbkBkArs7O0MrOMQBTllhxRS+sOtRbs1WgHX0iUAvil OE3Vkd8wKfw4vvLBkys49YAQ724h2qkg7vZf7QcdZ2QeHSzMvxMRAEyIH1AYqg4X4mIC CgzEHgJIBLafWDpiNSkJipls6zhCIGX6P2zeWvZVwwW6DTlcH9vwVfagR0xhT/35NHZ1 9V6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=YNZGZG+zUOCN+zt6YkuxtUSnyUL6VenE6fB/Br9dNmY=; b=YTl8XFWk1Ihrsq2jGYZpmM2k6WeQVCP7Dv6RY/zTJbO8zwTZ0W6r4fAB5cd0kx9taL soNHO0aQAWA6f4S4ceub+QEXlUotYZrn9REGDHgycHfFZoBGOPYcstZk/nzV6QUwaX4o zKxBoGbhyABKuQPIUW7C9cnmfRrwR/sBPGttWjjNvhQSmjSRXGlX+esRvPHo+29GEYhg H5lYE4a8QdpB7GpCTOV+B9cHrlXFCQOuQ/eqEdwqDImtIySeybkSDv2eBkvQ9bCh4VDW iBGmgmz6TBTW7ZT+ccztm9PGT5e+vjppyzjRO/AtZdRdVOeXoPgBKjVtnQCNWMx0ku/T EJ5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l14si4738658ilf.126.2021.07.29.12.50.23; Thu, 29 Jul 2021 12:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbhG2Tth (ORCPT + 99 others); Thu, 29 Jul 2021 15:49:37 -0400 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:23159 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229606AbhG2Ttg (ORCPT ); Thu, 29 Jul 2021 15:49:36 -0400 Received: from localhost.localdomain ([86.243.172.93]) by mwinf5d56 with ME id b7pU2500D21Fzsu037pUqA; Thu, 29 Jul 2021 21:49:31 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 29 Jul 2021 21:49:31 +0200 X-ME-IP: 86.243.172.93 From: Christophe JAILLET To: narmstrong@baylibre.com, mchehab@kernel.org, khilman@baylibre.com, jbrunet@baylibre.com, martin.blumenstingl@googlemail.com, 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, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] media: meson-ge2d: Fix rotation parameter changes detection in 'ge2d_s_ctrl()' Date: Thu, 29 Jul 2021 21:49:25 +0200 Message-Id: <6cb8efcadcf8c856efb32b7692fc9bf3241e3bc3.1627588010.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is likely a typo here. To be consistent, we should compare 'fmt.height' with 'ctx->out.pix_fmt.height', not 'ctx->out.pix_fmt.width'. Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit") Signed-off-by: Christophe JAILLET --- I've not looked deeply in the code, but why is this test needed in the first place? Couldn't we assigned 'ctx->out.pix_fmt = fmt' un-conditionally? --- drivers/media/platform/meson/ge2d/ge2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c index a1393fefa8ae..be22bb60e7cf 100644 --- a/drivers/media/platform/meson/ge2d/ge2d.c +++ b/drivers/media/platform/meson/ge2d/ge2d.c @@ -780,7 +780,7 @@ static int ge2d_s_ctrl(struct v4l2_ctrl *ctrl) * parameters, take them in account */ if (fmt.width != ctx->out.pix_fmt.width || - fmt.height != ctx->out.pix_fmt.width || + fmt.height != ctx->out.pix_fmt.height || fmt.bytesperline > ctx->out.pix_fmt.bytesperline || fmt.sizeimage > ctx->out.pix_fmt.sizeimage) ctx->out.pix_fmt = fmt; -- 2.30.2