From patchwork Fri Dec 2 15:27:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 630513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2DCFC4321E for ; Fri, 2 Dec 2022 15:28:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233627AbiLBP2U (ORCPT ); Fri, 2 Dec 2022 10:28:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233800AbiLBP2I (ORCPT ); Fri, 2 Dec 2022 10:28:08 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F17356EC8 for ; Fri, 2 Dec 2022 07:28:04 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id l39-20020a05600c1d2700b003cf93c8156dso4537891wms.4 for ; Fri, 02 Dec 2022 07:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jW/wraYzdeVh5VN6Plj6mY5qgvxc6yfVXPI0v0RffG8=; b=T6xLzGf3TMqby53fsUCeMhnBP4LI2llt+uN1pGULRH5d9uNVQh8hPqHwe0h6k4IOxD IeTpYXRinbiXbqt19DZZaM4vu0B1g/WrhBy+BFmuCSUNrKQGG4C28H4JYKztrNSWyGYC dhYQsfPEypKN4tygZWW46gJlVA7z1aSX6CpwZolUfgldBblmtxeOwOo05goj5fSluUFH DeAvnCF3W6R7ikVH9jf5LZmVv7WckVvIX/qH9n/A4ZWs0AzAVdkoDncW0gG2FCs6mPOa 9oBt6SPQYn0aJDkreghjgDt1ilx+xuUpqGjS5tVCruy7DWXSKF9Ht1Tp/JNAwi7ez1WT +iAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jW/wraYzdeVh5VN6Plj6mY5qgvxc6yfVXPI0v0RffG8=; b=1nUMynfQk+3CnCLye4iCuGIFnIqSYKA0tpB948hLFc2midnqe9ULW9oXTuw/lj1eAD vv/4GBqgH4yr5Ta9RJ8m9XJ0fK2Cx0SBFC2qlHK/fbIlNYjZwNzd/3mG6WriSxycqBdI CkjC322G1YBT/gXTSX+OUSC+nA+HEDy0SuaWGW+myoU7i9bB3AulrZrEGA/mmBOTShd3 gH9+bFczf5C21uGopZZtWSUwTo5cMh87Rz5q5G8nzqj9DdJdAtfJAEjeJ5ZEWAHvakyH Xq4j0NC0f0PAeIcSoYQAUgqbYKHanQm4dwpPA+wk3P/42HYlqlMD80/9ZwvTz4jbJTtV qkwA== X-Gm-Message-State: ANoB5pnZgVPD0L4Oh0HcExT1Ag+NhL28Vklh1Gq7OscT5wE67sv9+hLD epVFwyHcpd8HlfIj+LgvOsT2NxibGRT/y/MRIhs= X-Google-Smtp-Source: AA0mqf4fZ5C8H6QFWhtrNkO1yzoaXvhnD7dN9Qiu3Iz9mnwVZvXXXOJ2pgX+/+LVKFb/DX1rQWit3Q== X-Received: by 2002:a1c:7212:0:b0:3cf:7a77:589a with SMTP id n18-20020a1c7212000000b003cf7a77589amr38989873wmc.194.1669994883057; Fri, 02 Dec 2022 07:28:03 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([93.93.133.154]) by smtp.googlemail.com with ESMTPSA id t17-20020a05600c41d100b003cf71b1f66csm8322773wmh.0.2022.12.02.07.28.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 07:28:02 -0800 (PST) From: Dave Stevenson To: Rui Miguel Silva , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Jimmy Su , linux-media@vger.kernel.org Cc: Dave Stevenson Subject: [PATCH 3/5] media: i2c: imx319: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Fri, 2 Dec 2022 15:27:25 +0000 Message-Id: <20221202152727.1010207-4-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221202152727.1010207-1-dave.stevenson@raspberrypi.com> References: <20221202152727.1010207-1-dave.stevenson@raspberrypi.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The driver changes the Bayer order based on the flips, but does not define the control correctly with the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Add the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Signed-off-by: Dave Stevenson --- drivers/media/i2c/imx319.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/imx319.c b/drivers/media/i2c/imx319.c index 245a18fb40ad..45b1b61b2880 100644 --- a/drivers/media/i2c/imx319.c +++ b/drivers/media/i2c/imx319.c @@ -2328,8 +2328,12 @@ static int imx319_init_controls(struct imx319 *imx319) imx319->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx319_ctrl_ops, V4L2_CID_HFLIP, 0, 1, 1, 0); + if (imx319->hflip) + imx319->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; imx319->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx319_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0); + if (imx319->vflip) + imx319->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; v4l2_ctrl_new_std(ctrl_hdlr, &imx319_ctrl_ops, V4L2_CID_ANALOGUE_GAIN, IMX319_ANA_GAIN_MIN, IMX319_ANA_GAIN_MAX, From patchwork Fri Dec 2 15:27:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 630512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3292C4708E for ; Fri, 2 Dec 2022 15:28:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233677AbiLBP2V (ORCPT ); Fri, 2 Dec 2022 10:28:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233724AbiLBP2J (ORCPT ); Fri, 2 Dec 2022 10:28:09 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2890519C05 for ; Fri, 2 Dec 2022 07:28:05 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id y16so8325613wrm.2 for ; Fri, 02 Dec 2022 07:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EnNaOqKELb/P/Bk4n6UhDUAchVtxeaDm0Jk7LHbei/o=; b=Mm/mzfVVNCYf8kjvat7BSLisCc/OzjqvnC444isE/DezE7YR7+Zi9k25S1QPlT7rli ygZmawugGma+uiiEt/aYi+zEo9NNkBwUQfY/3NDFlhJ4JlL/T1rUZxWAHpJXXuBbrzoC GrbRdgsc/5lhF9a5yCErg6FB/Yl1GKGMhndlMllKrmwqqrJmeUOj//9Ex8ZTwKh6aNLH S4XYGmuUC87rXuhflh/RL/CkMidjCS4j8k2Vw0gUhzX8wdzN24dEpDwRbfXfaxxKQmjM SKJpT/fDyWL7UoTtEAAcSdzvwaYvIWfGzVjBqkiiaRLdSYp1MQZyluBPuGsg+CsgYlmh 7AlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EnNaOqKELb/P/Bk4n6UhDUAchVtxeaDm0Jk7LHbei/o=; b=hriDHrIQz8+E+IiLe4vU2AlXPObNU0wX/dh5wDNcwK0TO4S2/Qq98tNa98RlL/omE2 kZlEbMDCidvIBW9cbOLBZqAkRrGW6DJV8KlZlUUkxVkyDWtPuM7wINgomj3GKPIB8NFO DrQwkHf6/p+Sx+4rfPhYxnTmlllRJy2TdbiWbRj+7eC1PNzVDz36TcKyaG7atPq+bghH FmQvJLGTen1BRDb5UGHKOlumV9xUi6UbylsO2s2dx7Kk3w0F+PWJe7B/Pf2MFaTQD8yJ /rBhqRRCCAMW/dnJQ4QRBX+5/34chssiWiZOrPWyD6QvXLXrOesfkYcbEwPjFqsXwBuT xrVg== X-Gm-Message-State: ANoB5pmwO9iXuM+3N+nnDNC9VxWs/mI2HkeS1mj5Jka+7b8yHEzDFjQZ EU/IIQrtBAp0djktRyNTS+smZw== X-Google-Smtp-Source: AA0mqf7/pNDv1/QdN9ChUzaw8ns8rLpOt3wafok3tKjPrOL+wO/U23xAjDbQKReFp/J8ZWI40Ckrgw== X-Received: by 2002:adf:f243:0:b0:242:28f8:1b5f with SMTP id b3-20020adff243000000b0024228f81b5fmr8684088wrp.545.1669994883645; Fri, 02 Dec 2022 07:28:03 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([93.93.133.154]) by smtp.googlemail.com with ESMTPSA id t17-20020a05600c41d100b003cf71b1f66csm8322773wmh.0.2022.12.02.07.28.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 07:28:03 -0800 (PST) From: Dave Stevenson To: Rui Miguel Silva , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Jimmy Su , linux-media@vger.kernel.org Cc: Dave Stevenson Subject: [PATCH 4/5] media: i2c: imx355: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Fri, 2 Dec 2022 15:27:26 +0000 Message-Id: <20221202152727.1010207-5-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221202152727.1010207-1-dave.stevenson@raspberrypi.com> References: <20221202152727.1010207-1-dave.stevenson@raspberrypi.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The driver changes the Bayer order based on the flips, but does not define the control correctly with the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Add the V4L2_CTRL_FLAG_MODIFY_LAYOUT flag. Signed-off-by: Dave Stevenson --- drivers/media/i2c/imx355.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c index b46178681c05..f515cf1e52e7 100644 --- a/drivers/media/i2c/imx355.c +++ b/drivers/media/i2c/imx355.c @@ -1617,8 +1617,12 @@ static int imx355_init_controls(struct imx355 *imx355) imx355->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx355_ctrl_ops, V4L2_CID_HFLIP, 0, 1, 1, 0); + if (imx355->hflip) + imx355->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; imx355->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx355_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0); + if (imx355->vflip) + ctrls->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; v4l2_ctrl_new_std(ctrl_hdlr, &imx355_ctrl_ops, V4L2_CID_ANALOGUE_GAIN, IMX355_ANA_GAIN_MIN, IMX355_ANA_GAIN_MAX,