From patchwork Mon Dec 5 15:21:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13064668 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 0D5D2C47089 for ; Mon, 5 Dec 2022 15:25:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231848AbiLEPZQ (ORCPT ); Mon, 5 Dec 2022 10:25:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232584AbiLEPY6 (ORCPT ); Mon, 5 Dec 2022 10:24:58 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA55A20BFB for ; Mon, 5 Dec 2022 07:22:12 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id bx10so19169032wrb.0 for ; Mon, 05 Dec 2022 07:22:12 -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=xzw5Cw5Kc1/3fvoKTJkRNd8l6kNFCYQflUftOHhfbOo=; b=cz86amsHb1M0BLwqtvF7EidYjMv08FQQucM974wUhylHtS+/dmcWzSicEkX+z6iNw3 N41MCm+Gt9C91Pz/CoPpEmeHDBnaBENHWVbsE6DmtVZQ0GjQrtX4w4adMNzW9Eq3zLyh SPws6UoPaRSHnT9/MztRgpDYMLkS8XUtDMS19W3y7b8gMNjrVhCJOQcc7nQ6DE/TDnq4 KvlCatOiSVbce0V9VYZlGoqhcIC7ox7ElfYUi0bzienrCjrUy6GW86BfmlfLqGrfa5Zq Pnu3dh7N8JrpzE/jmtm8YTT6VCCYP6kV1qrJLkU+DHdiltkjUqhmUMVUwCN1fAg+aEUU mV7A== 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=xzw5Cw5Kc1/3fvoKTJkRNd8l6kNFCYQflUftOHhfbOo=; b=7xYQnJV5ojhEZ8WhAxNfyj7L2OM/iztepoghQRMt8TIsfl8yzLgoRAGFCxv9FeMZhG VnQqLer9anC3ATF5eDtLfifZg+Yqg7Od1fYr6nO31ZlmnI4gB1a8e2aJcIpzfF89hXTn B0TvQJaIKv1XcrRaItUaprwm9luVskNb71DK28eSJldpW8llhtz18i1GH3SD3u1Sku0H bdPY7jhvcFp9cJFw8JvSSdIoAQwzFj32IAWoeTOhDCoIWTt+eLRBhtGomo9XlOFPUg0z znvRshghrSaO+v5uK963xgj8xGdrewvF+CcqvAf4CBSusJmpv55rpBdUalghKzkdskYz OJ7A== X-Gm-Message-State: ANoB5pnObARMRc8pjP08Or32Uc1k3TxUfvPkUgx5ozWS+RrrlzA2Kw1Y scc0hHU++L/RkOax/l0TILSEoWOyxptTcwfA X-Google-Smtp-Source: AA0mqf638E02RuPC8//7seUkXu72WylvplJZ57tXuhU0US7a2kT2b1MpINIifa8jNHEYEZ/NS7SVdQ== X-Received: by 2002:adf:f4d0:0:b0:242:155c:6b97 with SMTP id h16-20020adff4d0000000b00242155c6b97mr22304596wrp.540.1670253730541; Mon, 05 Dec 2022 07:22:10 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([93.93.133.154]) by smtp.googlemail.com with ESMTPSA id fc13-20020a05600c524d00b003d04e4ed873sm25144905wmb.22.2022.12.05.07.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 07:22:10 -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 v2 1/5] media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Mon, 5 Dec 2022 15:21:45 +0000 Message-Id: <20221205152149.1364185-2-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221205152149.1364185-1-dave.stevenson@raspberrypi.com> References: <20221205152149.1364185-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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c index de66d3395a4d..54153bf66bdd 100644 --- a/drivers/media/i2c/ov2680.c +++ b/drivers/media/i2c/ov2680.c @@ -967,6 +967,8 @@ static int ov2680_v4l2_register(struct ov2680_dev *sensor) ctrls->gain->flags |= V4L2_CTRL_FLAG_VOLATILE; ctrls->exposure->flags |= V4L2_CTRL_FLAG_VOLATILE; + ctrls->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; + ctrls->hflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; v4l2_ctrl_auto_cluster(2, &ctrls->auto_gain, 0, true); v4l2_ctrl_auto_cluster(2, &ctrls->auto_exp, 1, true); From patchwork Mon Dec 5 15:21:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13064669 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 C0123C4321E for ; Mon, 5 Dec 2022 15:25:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbiLEPZS (ORCPT ); Mon, 5 Dec 2022 10:25:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232589AbiLEPY6 (ORCPT ); Mon, 5 Dec 2022 10:24:58 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 305C620BFD for ; Mon, 5 Dec 2022 07:22:13 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id d1so19067679wrs.12 for ; Mon, 05 Dec 2022 07:22:13 -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=gKXvK5MvFiZUPsJLobJ/bEu1c69AeNltUqU9RTPUdWBlhAzK6k8ZFL1gt+i262wKlM Xvr56W7R1nhieBYnElOWynJsFO4ZBvxXntHQi5SbzgJTCry25qFfvqcc4vEulQzfsd+L ykELg9ipAX0sHFZ+nOOdwLBIh22pCe/a44K5xVeuhWWhStISDcMM/Nd1tzSi4jPCiBny mWebCjlQc3kUp3vA2XQQ0RgONp/nFFFfCwUqDW7r570I27wjQVnDSpnr0K4RF7WoYItC LJ5ffgJsy3Aoa6rfg1kCyvSKI43kieGB99kFt6dNTTW0waVXnGAQTnnmLmy/oBzj0lyV Urbg== 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=Rd9npLXmfRQr6Lb+CnCPZCo6CYQ+VUuy+EwY6tsq0I40nuxMh7ExT1YpTtmwjVIQ8r 1TrrzEbv/HrD8hxv3MXtL7JZAYzYh7OyhDVanDetzYwMNx+ecMDACk9wESbzvzc829EL PW5pkhzntoZKgWDWQJajjxsXfzulsebPMtWbMS51ND+c120jI0FI1JLJDkQnq4rXWlt9 slWaVxlIy9l1PD73JAhSwCl80gme/FF5e/dfSPo0B9yWp7AulDuKVtiVwQ0lAqgsBw5Z SG9mbcTxTDJRBmKMf8K5T5HmUlxKP2fUhHzUQ1EQ0GdRT0/NiZtg2JQU4cHrqbG/mYj7 zXCg== X-Gm-Message-State: ANoB5plD84vv5pUhPmRXEROCVNEFkgeZqTFnfAQehkSIKxt7MuFYbtko lOqJTXhJRjbAudoHH728xfGmJQ== X-Google-Smtp-Source: AA0mqf6KKANqFPZtofBA6GvhbJfTWGN5MRyIwF1hM78s6NI5ANXdSlQPFRovgi4aqpheYh15J//wwg== X-Received: by 2002:a05:6000:1046:b0:241:fa2d:debc with SMTP id c6-20020a056000104600b00241fa2ddebcmr34139713wrx.12.1670253731284; Mon, 05 Dec 2022 07:22:11 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([93.93.133.154]) by smtp.googlemail.com with ESMTPSA id fc13-20020a05600c524d00b003d04e4ed873sm25144905wmb.22.2022.12.05.07.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 07:22:10 -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 v2 2/5] media: i2c: imx208: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Mon, 5 Dec 2022 15:21:46 +0000 Message-Id: <20221205152149.1364185-3-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221205152149.1364185-1-dave.stevenson@raspberrypi.com> References: <20221205152149.1364185-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 Mon Dec 5 15:21:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13064671 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 4AED5C4708D for ; Mon, 5 Dec 2022 15:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232572AbiLEPZ0 (ORCPT ); Mon, 5 Dec 2022 10:25:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232422AbiLEPZA (ORCPT ); Mon, 5 Dec 2022 10:25:00 -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 7101A20BFF for ; Mon, 5 Dec 2022 07:22:14 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id y16so19125284wrm.2 for ; Mon, 05 Dec 2022 07:22:14 -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=pxT3QuEFaoyxydtMf1y6iaI+cyLUMfjibZVa4ik2l2fDGq2tqQoiCt68EvrEWGEhYF lZVF+cyG9lY1L9z03QG1IK86BXAbmiGC69f8R9scCn69iK9v5fvD34dQUR7xyA2qxUfa 2yM1KBLo62rbmk4boVkcgSqLe3K/eKCdBeWuBE9crJETOvlfUu57x2qYc9P0C0jzHvWw Cx2xyiWsbTz0659TI7l8rAntnJUmElLobmFZ2H0m+mJHFNerXLTC1U7+XbKW1SaQTIDV Jw25hMCKjjOuIQvqpa+gqF6cdb+jQZbVJBPGTuB2XPR17BfGda1zVD6k6SfpL6WMqNx/ WEsg== 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=CiUvFJWsybZ3zfe7FbW4hILZs0V5/x8NWljGSpyBHwPO01NmhmJG43w7KS4WPcubB5 JDrtouketFCG1wdVZub4gg3kC7/vW4pqgUMeKPUQShragpljgk22GAsSqSCKgidwGPOw 1H2KU3jJu47jk9mdRGjpT+mHLXsaYbfTD44Sv4vB6SKxEM1yeVZVy/yT9tjoMpbMUrUa pP770qV+205oijssHG1knx5Kidknw+yq3CyLGDORlHT8RBvLgyIqyRbXukoRouU3pKav vydDyQI5sbJWuE8U36g+a80RfFN8FqdIycp+XjwqvlDQ4tUj7wJTUx5aLK1UP4cLhOLB t5Cw== X-Gm-Message-State: ANoB5pnPMJ8xnkx8BfU8hYyg0p0IYUGLeqcq0lwx97FwPfSabFD+MLvP zpefS5g5KvUklbUeDJMdqBk8jA== X-Google-Smtp-Source: AA0mqf6U348ZFOAy8ENh041iW1hN7Fiobz6Mc+oenTnGyPpiQbIzcgFolNufEWQZRRH3iR57U/IyQw== X-Received: by 2002:adf:de08:0:b0:242:1d2c:9d78 with SMTP id b8-20020adfde08000000b002421d2c9d78mr20515260wrm.490.1670253732168; Mon, 05 Dec 2022 07:22:12 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([93.93.133.154]) by smtp.googlemail.com with ESMTPSA id fc13-20020a05600c524d00b003d04e4ed873sm25144905wmb.22.2022.12.05.07.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 07:22:11 -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 v2 3/5] media: i2c: imx319: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Mon, 5 Dec 2022 15:21:47 +0000 Message-Id: <20221205152149.1364185-4-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221205152149.1364185-1-dave.stevenson@raspberrypi.com> References: <20221205152149.1364185-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 Reviewed-by: Bingbu Cao --- 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 Mon Dec 5 15:21:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13064670 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 54CE6C4321E for ; Mon, 5 Dec 2022 15:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232521AbiLEPZY (ORCPT ); Mon, 5 Dec 2022 10:25:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231958AbiLEPY7 (ORCPT ); Mon, 5 Dec 2022 10:24:59 -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 72EB620F47 for ; Mon, 5 Dec 2022 07:22:14 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id d1so19067815wrs.12 for ; Mon, 05 Dec 2022 07:22:14 -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=0+jHFMZScyfUNZiOOh7s/dn912ZUyLRMHPvPbt4Ppd0=; b=op5dhnZz5wVG6btVFp7KctZ7K36AsBYcn2FpH+WBS8nDgeMTugq5BycqmRr36/7AGv Pz1VUq+PDWG/b+cibKAhN5xtAjduUHk/fByzapmXaGAugK03HGgZkvMrPGGkPcA6o4GF JTIxilb4lMIzFgwy7N0sNA+3ZTd4Vl9EMP80LjyWq2QcqqVWKqmyFWkJwqBz/hz6tgtW v19RpvRmuSzCa4nzyC1WD1c98Ed1x/g/QttNCgv0XDRKpHZ15FoUwKldwh1UgeZJCxmE /+sDHFfVSI6urbQSQcwZxjhCPsi3gcpsdkhExO7nH9+j5u73/uKDV9z3LwOk/AvmxkgX 90jg== 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=0+jHFMZScyfUNZiOOh7s/dn912ZUyLRMHPvPbt4Ppd0=; b=arj122dcJ/n+tFVuiqRkAvoCWYcpQr+Me8lEZQvduFRswIaW5RI36SJu1IineezMZ9 VTifOJ20nrLwl0pC+pPqQGr+DMdM2zswYYVBom9XNcslOq+uhRy4iKL8FaQ8y/apI/pS BHMzzttg/WWb0h07M8WL3XZboc9v9lilQnI2TAWaK4tr6W8uwEE3w9eE+FSJAbr6oxtA I2oo+esXOWY+e9XC2BRXo8VAuBrIwLGovfbJwLZMyzNI5D79p4FrY1C7QB1nMhhjffof 6wxJIel2aOoeoMfJeZb1CwKTMYs6TCZAyn9m9//4z8PlGUTBy6nzzGSwjfa0hBkVKqpU QFjw== X-Gm-Message-State: ANoB5plejhJCNRL41I4dp3QKkztMJpDWFZElQ8RSCXWZUNVppOJQK1mP p3gLxoGDlZ65j0uk+loxpW/KAQ== X-Google-Smtp-Source: AA0mqf7mngfRA8tqWuKE4iisQQvWROLKrf2EKzkzNtIUTOVlCbifO/S8VcOtOQJ6MuHiCo6e1xgxQg== X-Received: by 2002:a5d:510b:0:b0:241:fe9d:fbf4 with SMTP id s11-20020a5d510b000000b00241fe9dfbf4mr32357487wrt.412.1670253732834; Mon, 05 Dec 2022 07:22:12 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([93.93.133.154]) by smtp.googlemail.com with ESMTPSA id fc13-20020a05600c524d00b003d04e4ed873sm25144905wmb.22.2022.12.05.07.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 07:22:12 -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 v2 4/5] media: i2c: imx355: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Mon, 5 Dec 2022 15:21:48 +0000 Message-Id: <20221205152149.1364185-5-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221205152149.1364185-1-dave.stevenson@raspberrypi.com> References: <20221205152149.1364185-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 Reviewed-by: Bingbu Cao --- 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..25d4dbb6041e 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) + imx355->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 Mon Dec 5 15:21:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13064672 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 1678EC4332F for ; Mon, 5 Dec 2022 15:25:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232422AbiLEPZ1 (ORCPT ); Mon, 5 Dec 2022 10:25:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231991AbiLEPZC (ORCPT ); Mon, 5 Dec 2022 10:25:02 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50B6320F51 for ; Mon, 5 Dec 2022 07:22:16 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id bg10so9001231wmb.1 for ; Mon, 05 Dec 2022 07:22:15 -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=SXA1c2F9YaXaMcnGm6ue1saPcIabZBH1FCgtKGVs64JfVhpQylYKsomj7N9W4t+IVE CE8gyKR0gNlabFNC4vw9iBpVGajDfFpES9ZuT/d5lAYk/kZJPIr4k4KE6Cz8i7MORks+ HSoook0Tgmb5gmc8i8h+9GK/9aptNzomTHQDgpQA+ZOu2ROzQ8LVG0W6qcdYV/N/o/y9 EWO933VwPbU1QthJtgGElJF7oHa7f77p27wsvY4b93o+8ix9CqCjJ0wTHwn9+9d5QCDo rt7Qf7Nhyh/ZKeaP+2d6jRNbc+sSdPIamQ8fLQtbiOAw8eB8k+ji2wClz9uBuqMNF+dn DqEg== 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=dMrWNNEF/HEzBxQQpcObYvPsYGPp5RUM7JT5c6CVKNUIIH8BZzRxTsQDbl2rbG7UgF mr63NuMciPrK9uIx1tdarU0WdYJRlr3a2k6T+neczUKAWssrc5wClJHeNmI9sQw8KzWU 9o981Zjkcv/Gv9zNWtzlG0in/FHjXVPGs/t/ORk+RJjGcV/FQoi0Mn+DtIEyumm+XxBw E3nPSg3h93rWjedh5p+wPUxdcaGLz3nIokWRy1zYUpFWPJVvdyj7Sh+7w3GERrV4x8QM hCibn5p2rrCO7tn+tjXeKVmjrcM2Os3WD1ynJqFNzku/qbW/JfqKY8nrqdz2bS+ooemC KWYg== X-Gm-Message-State: ANoB5pmdwwoNDqQTu0+O6URXPY6g1Cj2fJ5wX3J43KiUhNjzkVRPg8LZ p0OrH+1q7OtEHFhgml+r5Gyt1w== X-Google-Smtp-Source: AA0mqf7kXt8ZkmkgIvQNanWi2m1xBpMEQz7RspYEH7QsffCEpjs++F3lbN/5zFqwI+k9Vumn9aXZYw== X-Received: by 2002:a05:600c:5118:b0:3d0:7026:49eb with SMTP id o24-20020a05600c511800b003d0702649ebmr18230074wms.53.1670253733594; Mon, 05 Dec 2022 07:22:13 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([93.93.133.154]) by smtp.googlemail.com with ESMTPSA id fc13-20020a05600c524d00b003d04e4ed873sm25144905wmb.22.2022.12.05.07.22.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 07:22:13 -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 v2 5/5] media: i2c: ov08d10: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips Date: Mon, 5 Dec 2022 15:21:49 +0000 Message-Id: <20221205152149.1364185-6-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221205152149.1364185-1-dave.stevenson@raspberrypi.com> References: <20221205152149.1364185-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;