From patchwork Fri Dec 2 15:27:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13062800 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 BB8BFC4321E for ; Fri, 2 Dec 2022 15:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233758AbiLBP2R (ORCPT ); Fri, 2 Dec 2022 10:28:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233796AbiLBP2H (ORCPT ); Fri, 2 Dec 2022 10:28:07 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DD4E167C3 for ; Fri, 2 Dec 2022 07:28:03 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id v124-20020a1cac82000000b003cf7a4ea2caso6698077wme.5 for ; Fri, 02 Dec 2022 07:28:03 -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=eHxCc37p6tdMw7GDX0tfO1VJnOm4kf0kDirvDqrlf+U=; b=iH1xMw1EZeE3ieyZngL2aKBDPg0kK4e5KNUdwDcb2o9pI/xPyFNUOoybW6AcjMT90U 9gJEjhCIszudTcnSbq30aGCiUgKSGNvVnBdxTF6oUZpSoySE03DSmKKd7RykhEL7WT/b PQaGEA3p3V7sLcp6yKSBh4mmo8FeLwrHO//gawx/Jyg2hsGcQWyxp/lux5/bFMUrpgLi KwsAwfZA5Rqso8NR8e+WC4pXHq02hXnq0NrJRVtaeHMOqmzHEO+nhjDTEiB15EVDI9VF XTutjxe/2mONqZ9twjkT6L7+mFkxFhbxbkQJtPbd8DEnusOmAkjss5CXePb/NlN23Sys 54Bg== 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=eHxCc37p6tdMw7GDX0tfO1VJnOm4kf0kDirvDqrlf+U=; b=eaDQKagvrzXbt6TDKtE8Sl/zFwiumptpKrCSlHclDHyMNd6ncCNYjRUvbyKVGOomsM rGgHFQaPXSOOg3aj0shwMF/yXpG4metb5WO+5AIEEgORy4CCjsOql3OnLJMqp8Mt8/a2 pU8z03Jd/Uz5nxW3q8GaR9rAs67eZ6471p0yzLb3L2zmzB3Px0cpeDupOdG2uvvi3UrV UmMFjOYNto7vfRWkmkjiHGIO4fWh9hJo2EY8yfNj4xanRXHK/HJk8PC5kC9rTX5Ny6vr rVPp8Kj+DYsvoUbIPcJx/9EMj1+8HvISOMgrCqVi0Q7skFljrqA+MrPwS61J89Nn2iAg Ll8A== X-Gm-Message-State: ANoB5pnYSgJv7kmZCkrvqLptqYf+p7oOE9IRqqdmBGhlTPt/tiJRaEyB 4l3GIj2tn//49q4hTjUfp2j9Vg== X-Google-Smtp-Source: AA0mqf4P9YXaLNj4QsVVeT0EqnwpCUk7hJy/YtvZWeRrD7OZ1/cT9z4iw8Jr8Nn7KEF8g87r5nlcdQ== X-Received: by 2002:a05:600c:3b1e:b0:3c6:c182:b125 with SMTP id m30-20020a05600c3b1e00b003c6c182b125mr46128746wms.145.1669994881707; Fri, 02 Dec 2022 07:28:01 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 07:28:01 -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 1/5] media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Fri, 2 Dec 2022 15:27:23 +0000 Message-Id: <20221202152727.1010207-2-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 Acked-by: Rui Miguel Silva --- drivers/media/i2c/ov2680.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c index de66d3395a4d..aca76d7d674a 100644 --- a/drivers/media/i2c/ov2680.c +++ b/drivers/media/i2c/ov2680.c @@ -941,7 +941,11 @@ static int ov2680_v4l2_register(struct ov2680_dev *sensor) hdl->lock = &sensor->lock; ctrls->vflip = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_VFLIP, 0, 1, 1, 0); + if (ctrls->vflip) + ctrls->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; ctrls->hflip = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_HFLIP, 0, 1, 1, 0); + if (ctrls->hflip) + ctrls->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; ctrls->test_pattern = v4l2_ctrl_new_std_menu_items(hdl, &ov2680_ctrl_ops, V4L2_CID_TEST_PATTERN, From patchwork Fri Dec 2 15:27:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13062802 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 036E6C47088 for ; Fri, 2 Dec 2022 15:28:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233765AbiLBP2T (ORCPT ); Fri, 2 Dec 2022 10:28:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233682AbiLBP2I (ORCPT ); Fri, 2 Dec 2022 10:28:08 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C70801903E for ; Fri, 2 Dec 2022 07:28:03 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id w15so8285656wrl.9 for ; Fri, 02 Dec 2022 07:28:03 -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=q307OwUmjrBOARnf+xhbF57KM6ddL1J7Y5GnrvOnQZ8=; b=iDicF9dIoGYNac8k9mSQDVSg5NVtk1RItkLZTgx3UOrn1oYND6GvvQqxVMWF9Ob0+5 AynkKLLm2Zwj/pM40vcwkjpCHCJ6K8e+v5IyOx1ZMa5hrh2IcfJ3Ribd5qq0qQSbAKYk nt3Ol7N0F42S5ZIZUtbWtB63Iw+9B47e54amLCXVEKc5aN/H6e82wN+PLB/2oEY4TY6r WWsGrC9Zm+B3SDrxKYs78pjoeCigbhRpeMlDgz2/ixWVBq3fV2VpIeDYDVyUdYK6lLIQ PaLvRUqncC+Hh5NvMP5sWedoaUKn6mHcy41moeUGhp3OwZ9mbjKEiBftZ6zc3ltur/Bj Q+Qw== 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=q307OwUmjrBOARnf+xhbF57KM6ddL1J7Y5GnrvOnQZ8=; b=aI7ARa1ccHYzNAPaEIdndBsNskWeNve14dvPtHL8NdzQPBOli/efeG8clyAuqe6K2i QhKnF+CFQDzdDf1BVHNXgrZRU0qOn5q59r4MemdRC83w8C6X/ujbE/Zlz5H7UMMg4mcs g1leLMGzEpb0oOaoTqglysBmKFpr+6erJ3QpBKLIxoas6jAgfSA1rJVv7fNFoq6TBkvj g1jqo16ntnOJESLJAQgN07r1qoZcddTn49qAQ6t0N+gaHKHe+v8ldEmdseNgVAHlZnAP oRngimXYr/OpQaNbyf2ofchmmASolwYOft4H64xq7IRlVDbz6RtlddLVeUDvXuaHxAgl 65PQ== X-Gm-Message-State: ANoB5pkdTsfV13OVgSSwXa9wQukm882z1c1wHb94Cr9LmXqRu1qfWOW+ DisPFcs3EJQpzdGwmpYYMJ3X8Q== X-Google-Smtp-Source: AA0mqf56zlNI58TT97arpw2FMyAqGl+9zCZ7azoiUItRkp4FA4sWvek9njUxGhCS0pg97REYs7uAnw== X-Received: by 2002:adf:e347:0:b0:236:76de:7280 with SMTP id n7-20020adfe347000000b0023676de7280mr45350558wrj.194.1669994882395; Fri, 02 Dec 2022 07:28:02 -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.01 (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 2/5] media: i2c: imx208: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Fri, 2 Dec 2022 15:27:24 +0000 Message-Id: <20221202152727.1010207-3-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/imx208.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/imx208.c b/drivers/media/i2c/imx208.c index a0e17bb9d4ca..64c70ebf9869 100644 --- a/drivers/media/i2c/imx208.c +++ b/drivers/media/i2c/imx208.c @@ -937,8 +937,12 @@ static int imx208_init_controls(struct imx208 *imx208) imx208->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_HFLIP, 0, 1, 1, 0); + if (imx208->hflip) + imx208->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; imx208->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0); + if (imx208->vflip) + imx208->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_ANALOGUE_GAIN, IMX208_ANA_GAIN_MIN, IMX208_ANA_GAIN_MAX, 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: 13062803 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: 13062805 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, From patchwork Fri Dec 2 15:27:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13062804 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 DAB7BC47089 for ; Fri, 2 Dec 2022 15:28:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233724AbiLBP2W (ORCPT ); Fri, 2 Dec 2022 10:28:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233728AbiLBP2J (ORCPT ); Fri, 2 Dec 2022 10:28:09 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB63D1A046 for ; Fri, 2 Dec 2022 07:28:05 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id ay27-20020a05600c1e1b00b003d070f4060bso4549376wmb.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=CTVIxYEQfLFJxt9tgsgUJTz/t7cytxV6N5857OmJlts=; b=YUkRKBK6W7UIdwbXqyMjGph9HDZk6UISocrwriMe5QIdxs95HJPCwjt2oethKpdau7 bdxGGqj5skPbXoLiLLVNfcqs699VNWr2eqUQSOZm+3FIdLlU7k+2aewSbM2245aInbkG 4xQdhPHLIJ1UQr6OkN2yVZ4VIR7Q0k5bOSaRv0bnyPKcIEm9TpJUDZoyNKgK225BSTcP aAq0SAzMb1IzuqlHEp68Zq1VnFd5PVzBo11HsOEYvYkiNQymP39MjCvJy3wYcHRW006q tGVg1pyOsnO9IE10qnzuVL8QNY3mvAPkJG4pvdM4jCDMr9j/HVWV1MOHSjkFmad4Dn4b k9tg== 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=CTVIxYEQfLFJxt9tgsgUJTz/t7cytxV6N5857OmJlts=; b=1nkwTXO56YHT6czuybvgtm/YwkQWTOLi2uSWgGyTGFoBtRDIrSWTCtNdtZy11JZOI0 gQDUOuq6B2M6T5gbXeCbdJ7+oLmnoPXcdTyT7Y2W23YiEezhHHsM+kUkSIQzOvleXqah LXL4NL4l64PBL79oWfqZdY9J7tlfJoEFijcRvG+jZ5/qANp/fgD/obEtOq1rsHdFhEC1 9auhcno72M2v6uIc2SH5Mj38jlg67a0GXZ1TDCZ4dMiZR5Jh48Wq1WX15XBX4cR/0CXx YM5Q2OYwowP11LggAMra3FyIFP+upcCatZfG/4VUXt5xI2XVI8YKUDls6KEYQKF7JqUe 2NCQ== X-Gm-Message-State: ANoB5pmfgXQPn9XpHDQNkIzl7ezCpevuGPRgjlJuJNA/BjBiSa65k19v BQkNEhfiIbmq99Okpq/vJf5iDw== X-Google-Smtp-Source: AA0mqf47v23i0Y6WxQlyWJtP8WdLL98zzrQukLxk2tgjXmYTZNKSEM060eK0fALUYdhKkBYPtRv09A== X-Received: by 2002:a05:600c:4f93:b0:3cf:a616:ccc0 with SMTP id n19-20020a05600c4f9300b003cfa616ccc0mr57236129wmq.73.1669994884267; Fri, 02 Dec 2022 07:28:04 -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 5/5] media: i2c: ov08d10: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Fri, 2 Dec 2022 15:27:27 +0000 Message-Id: <20221202152727.1010207-6-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/ov08d10.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/i2c/ov08d10.c b/drivers/media/i2c/ov08d10.c index c1703596c3dc..a39e086a51c5 100644 --- a/drivers/media/i2c/ov08d10.c +++ b/drivers/media/i2c/ov08d10.c @@ -990,8 +990,13 @@ static int ov08d10_init_controls(struct ov08d10 *ov08d10) ov08d10->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops, V4L2_CID_HFLIP, 0, 1, 1, 0); + if (ov08d10->hflip) + ov08d10->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; ov08d10->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &ov08d10_ctrl_ops, V4L2_CID_VFLIP, 0, 1, 1, 0); + if (ov08d10->vflip) + ov08d10->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; + if (ctrl_hdlr->error) return ctrl_hdlr->error;