From: Cosmin Tanislav <demonsingur@gmail.com>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Cosmin Tanislav <demonsingur@gmail.com>
Subject: [PATCH v2 4/6] media: i2c: imx219: pass format's code to imx219_get_format_bpp()
Date: Fri, 21 Feb 2025 01:08:12 +0200 [thread overview]
Message-ID: <20250220230818.275262-5-demonsingur@gmail.com> (raw)
In-Reply-To: <20250220230818.275262-1-demonsingur@gmail.com>
imx219_get_format_bpp() only uses the code of the format, pass it
instead of the whole format to allow usage when the whole format is not
available.
Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
---
drivers/media/i2c/imx219.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index fcd98ee54768e..ad1965a91ae3c 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -387,9 +387,9 @@ static u32 imx219_get_format_code(struct imx219 *imx219, u32 code)
return imx219_mbus_formats[i];
}
-static u32 imx219_get_format_bpp(const struct v4l2_mbus_framefmt *format)
+static u32 imx219_get_format_bpp(u32 code)
{
- switch (format->code) {
+ switch (code) {
case MEDIA_BUS_FMT_SRGGB8_1X8:
case MEDIA_BUS_FMT_SGRBG8_1X8:
case MEDIA_BUS_FMT_SGBRG8_1X8:
@@ -680,7 +680,7 @@ static int imx219_set_framefmt(struct imx219 *imx219,
format = v4l2_subdev_state_get_format(state, 0);
crop = v4l2_subdev_state_get_crop(state, 0);
- bpp = imx219_get_format_bpp(format);
+ bpp = imx219_get_format_bpp(format->code);
cci_write(imx219->regmap, IMX219_REG_X_ADD_STA_A,
crop->left - IMX219_PIXEL_ARRAY_LEFT, &ret);
--
2.48.1
next prev parent reply other threads:[~2025-02-20 23:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 23:08 [PATCH v2 0/6] media: v4l: add support for Virtual Channel IDs Cosmin Tanislav
2025-02-20 23:08 ` [PATCH v2 1/6] dt-bindings: media: video-interfaces: " Cosmin Tanislav
2025-02-21 8:38 ` Sakari Ailus
2025-02-21 8:55 ` Cosmin Tanislav
2025-02-21 14:27 ` Cosmin Tanislav
2025-02-24 21:40 ` Laurent Pinchart
2025-02-20 23:08 ` [PATCH v2 2/6] media: v4l: fwnode: parse Virtual Channel IDs for CSI2 buses Cosmin Tanislav
2025-02-20 23:08 ` [PATCH v2 3/6] dt-bindings: media: imx219: add support for Virtual Channel IDs Cosmin Tanislav
2025-02-20 23:08 ` Cosmin Tanislav [this message]
2025-02-21 7:03 ` [PATCH v2 4/6] media: i2c: imx219: pass format's code to imx219_get_format_bpp() Jai Luthra
2025-02-20 23:08 ` [PATCH v2 5/6] media: i2c: imx219: Report streams using frame descriptors Cosmin Tanislav
2025-02-26 8:52 ` Sakari Ailus
2025-02-20 23:08 ` [PATCH v2 6/6] media: i2c: imx219: implement configurable VC ID Cosmin Tanislav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250220230818.275262-5-demonsingur@gmail.com \
--to=demonsingur@gmail.com \
--cc=conor+dt@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sakari.ailus@linux.intel.com \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.