public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: hans@jjverkuil.nl, laurent.pinchart@ideasonboard.com,
	Prabhakar <prabhakar.csengg@gmail.com>,
	"Kate Hsuan" <hpa@redhat.com>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
	"Tommaso Merciai" <tomm.merciai@gmail.com>,
	"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
	"Sylvain Petinot" <sylvain.petinot@foss.st.com>,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	"Julien Massot" <julien.massot@collabora.com>,
	"Naushir Patuck" <naush@raspberrypi.com>,
	"Yan, Dongcheng" <dongcheng.yan@intel.com>,
	"Cao, Bingbu" <bingbu.cao@intel.com>,
	"Qiu, Tian Shu" <tian.shu.qiu@intel.com>,
	"Stefan Klug" <stefan.klug@ideasonboard.com>,
	"Mirela Rabulea" <mirela.rabulea@nxp.com>,
	"André Apitzsch" <git@apitzsch.eu>,
	"Heimir Thor Sverrisson" <heimir.sverrisson@gmail.com>,
	"Kieran Bingham" <kieran.bingham@ideasonboard.com>,
	"Mehdi Djait" <mehdi.djait@linux.intel.com>,
	"Ricardo Ribalda Delgado" <ribalda@kernel.org>,
	"Hans de Goede" <hansg@kernel.org>,
	"Jacopo Mondi" <jacopo.mondi@ideasonboard.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
	"David Plowman" <david.plowman@raspberrypi.com>,
	"Yu, Ong Hock" <ong.hock.yu@intel.com>,
	"Ng, Khai Wen" <khai.wen.ng@intel.com>,
	"Jai Luthra" <jai.luthra@ideasonboard.com>
Subject: [PATCH v3 07/22] media: imx219: Rename "binning" as "bin_hv" in imx219_set_pad_format
Date: Wed, 25 Mar 2026 12:58:03 +0200	[thread overview]
Message-ID: <20260325105818.1176816-8-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20260325105818.1176816-1-sakari.ailus@linux.intel.com>

Rename "binning" as "bin_hv" in anticipation of having a variable called
"binning" for another purpose.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/i2c/imx219.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index ca6a5939773d..5a85d76af65a 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -825,7 +825,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
 	const struct imx219_mode *mode;
 	struct v4l2_mbus_framefmt *format;
 	struct v4l2_rect *crop;
-	u8 bin_h, bin_v, binning;
+	u8 bin_h, bin_v, bin_hv;
 	int ret;
 
 	format = v4l2_subdev_state_get_format(state, 0);
@@ -858,11 +858,11 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
 	bin_v = min(IMX219_VISIBLE_HEIGHT / format->height, 2U);
 
 	/* Ensure bin_h and bin_v are same to avoid 1:2 or 2:1 stretching */
-	binning = min(bin_h, bin_v);
+	bin_hv = min(bin_h, bin_v);
 
 	crop = v4l2_subdev_state_get_crop(state, 0);
-	crop->width = format->width * binning;
-	crop->height = format->height * binning;
+	crop->width = format->width * bin_hv;
+	crop->height = format->height * bin_hv;
 	crop->left = (IMX219_NATIVE_WIDTH - crop->width) / 2;
 	crop->top = (IMX219_NATIVE_HEIGHT - crop->height) / 2;
 
@@ -872,15 +872,15 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
 
 		/* Update limits and set FPS to default */
 		ret = __v4l2_ctrl_modify_range(imx219->vblank,
-					       (int)(mode->height / binning),
+					       (int)(mode->height / bin_hv),
 					       IMX219_FLL_MAX - mode->height, 1,
-					       (int)(mode->fll_def / binning) -
+					       (int)(mode->fll_def / bin_hv) -
 					       (int)mode->height);
 		if (ret)
 			return ret;
 
 		ret = __v4l2_ctrl_s_ctrl(imx219->vblank,
-					 (int)(mode->fll_def / binning) -
+					 (int)(mode->fll_def / bin_hv) -
 					 (int)mode->height);
 		if (ret)
 			return ret;
-- 
2.47.3


  parent reply	other threads:[~2026-03-25 10:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 10:57 [PATCH v3 00/22] Metadata series preparation Sakari Ailus
2026-03-25 10:57 ` [PATCH v3 01/22] media: imx219: Rename "PIXEL_ARRAY" as "VISIBLE" Sakari Ailus
2026-03-25 10:57 ` [PATCH v3 02/22] media: imx219: Fix maximum frame length in lines Sakari Ailus
2026-03-25 11:36   ` Dave Stevenson
2026-03-25 10:57 ` [PATCH v3 03/22] media: imx219: Set horizontal blanking on mode change Sakari Ailus
2026-03-25 11:48   ` Dave Stevenson
2026-03-25 12:20     ` Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 04/22] media: imx219: Scale the vblank limits according to rate_factor Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 05/22] media: imx219: Fix vertical blanking and exposure for analogue binning Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 06/22] media: imx219: Don't update exposure limits while setting format Sakari Ailus
2026-03-25 12:37   ` Dave Stevenson
2026-03-25 12:47     ` Sakari Ailus
2026-03-25 10:58 ` Sakari Ailus [this message]
2026-03-25 10:58 ` [PATCH v3 08/22] media: Documentation: Improve LINK_FREQ documentation Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 09/22] media: Documentation: Improve pixel rate calculation documentation Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 10/22] media: v4l2-subdev: Refactor returning routes Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 11/22] media: v4l2-subdev: Allow accessing routes with STREAMS client capability Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 12/22] media: mc: Simplify link processing in __media_pipeline_start() Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 13/22] media: mc: Separate single link validation into a new function Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 14/14] media: Improve enable_streams and disable_streams documentation Sakari Ailus
2026-03-25 12:34   ` Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 14/22] media: uapi: Bump the STREAMS bit a little Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 15/22] media: mc: Don't care about unsettable flags in MEDIA_IOC_LINK_SETUP Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 16/22] media: mc: Add MEDIA_LNK_FL_VALIDATE_LATE Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 17/22] media: Improve enable_streams and disable_streams documentation Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 18/22] media: v4l2-subdev: Move subdev client capabilities into a new struct Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 19/22] media: v4l2-subdev: Add struct v4l2_subdev_client_info pointer to pad ops Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 20/22] media: v4l2-subdev: Add v4l2_subdev_call_ci_active_state Sakari Ailus
2026-03-25 10:58 ` [PATCH v3 21/22] media: v4l2-subdev: Perform client info changes to i2c drivers Sakari Ailus

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=20260325105818.1176816-8-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=bingbu.cao@intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=david.plowman@raspberrypi.com \
    --cc=dongcheng.yan@intel.com \
    --cc=git@apitzsch.eu \
    --cc=hans@jjverkuil.nl \
    --cc=hansg@kernel.org \
    --cc=heimir.sverrisson@gmail.com \
    --cc=hpa@redhat.com \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=jai.luthra@ideasonboard.com \
    --cc=julien.massot@collabora.com \
    --cc=khai.wen.ng@intel.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mehdi.djait@linux.intel.com \
    --cc=mirela.rabulea@nxp.com \
    --cc=naush@raspberrypi.com \
    --cc=ong.hock.yu@intel.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=ribalda@kernel.org \
    --cc=stefan.klug@ideasonboard.com \
    --cc=sylvain.petinot@foss.st.com \
    --cc=tian.shu.qiu@intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tomm.merciai@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox