On Tue Oct 7 17:09:18 2025 +0200, Hans Verkuil wrote:
> If prev->input != PREVIEW_INPUT_MEMORY the width and height weren't
> clamped. Just always clamp.
>
> This fixes a v4l2-compliance error:
>
> fail: v4l2-test-subdevs.cpp(171): fse.max_width == ~0U ||
> fse.max_height == ~0U
> fail: v4l2-test-subdevs.cpp(270): ret && ret != ENOTTY
> test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: FAIL
>
> Signed-off-by: Hans Verkuil <[email protected]>
> Acked-by: Sakari Ailus <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/platform/ti/omap3isp/isppreview.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/drivers/media/platform/ti/omap3isp/isppreview.c
b/drivers/media/platform/ti/omap3isp/isppreview.c
index 3e9e213c6d8a..3f3b5bd9cdc7 100644
--- a/drivers/media/platform/ti/omap3isp/isppreview.c
+++ b/drivers/media/platform/ti/omap3isp/isppreview.c
@@ -1742,22 +1742,17 @@ static void preview_try_format(struct isp_prev_device
*prev,
switch (pad) {
case PREV_PAD_SINK:
- /* When reading data from the CCDC, the input size has already
- * been mangled by the CCDC output pad so it can be accepted
- * as-is.
- *
- * When reading data from memory, clamp the requested width and
- * height. The TRM doesn't specify a minimum input height, make
+ /*
+ * Clamp the requested width and height.
+ * The TRM doesn't specify a minimum input height, make
* sure we got enough lines to enable the noise filter and color
* filter array interpolation.
*/
- if (prev->input == PREVIEW_INPUT_MEMORY) {
- fmt->width = clamp_t(u32, fmt->width, PREV_MIN_IN_WIDTH,
- preview_max_out_width(prev));
- fmt->height = clamp_t(u32, fmt->height,
- PREV_MIN_IN_HEIGHT,
- PREV_MAX_IN_HEIGHT);
- }
+ fmt->width = clamp_t(u32, fmt->width, PREV_MIN_IN_WIDTH,
+ preview_max_out_width(prev));
+ fmt->height = clamp_t(u32, fmt->height,
+ PREV_MIN_IN_HEIGHT,
+ PREV_MAX_IN_HEIGHT);
fmt->colorspace = V4L2_COLORSPACE_SRGB;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]