[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251230-mt9m114-atomisp-v5-10-763539e76094@oss.qualcomm.com>
Date: Tue, 30 Dec 2025 18:03:07 +0100
From: Hans de Goede <johannes.goede@....qualcomm.com>
To: Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Hans de Goede <johannes.goede@....qualcomm.com>
Subject: [PATCH v5 10/14] media: mt9m114: Update source pad selection and
format when sink pad format changes
Call mt9m114_ifp_update_sel_and_src_fmt() on sink pad format changes to
propagate these downstream.
This is necessary in 2 different scenarios:
1. When passing through RAW10 bypassing the scaler then any sink pad format
changes must be propagated to the crop/compose selections and to the source
pad format.
2. When the scaler is active, then the crop-rectangle cannot be bigger then
the sink pad format minus a 4 pixel border all around. If the sink format
change reduces the size then things also needs to be propagated downstream.
Rather then adding extra code to check for these conditions, simply always
propagate sink pad format changes downstream.
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Signed-off-by: Hans de Goede <johannes.goede@....qualcomm.com>
---
Changes in v4:
- Address comments from Laurent about commit message and comment wording
---
drivers/media/i2c/mt9m114.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c
index 9ef237943a085e058c17c8ffe50636ca2e4d95c3..d111f9e45d2d9c47de315d06ee8a6adb28700146 100644
--- a/drivers/media/i2c/mt9m114.c
+++ b/drivers/media/i2c/mt9m114.c
@@ -1892,6 +1892,9 @@ static int mt9m114_ifp_set_fmt(struct v4l2_subdev *sd,
format->height = clamp(ALIGN(fmt->format.height, 8),
MT9M114_PIXEL_ARRAY_MIN_OUTPUT_HEIGHT,
MT9M114_PIXEL_ARRAY_HEIGHT);
+
+ /* Propagate changes downstream. */
+ mt9m114_ifp_update_sel_and_src_fmt(state);
} else {
const struct mt9m114_format_info *info;
--
2.52.0
Powered by blists - more mailing lists