On Tue Oct 7 17:06:43 2025 +0200, Hans Verkuil wrote:
> If ccp2->input == CCP2_INPUT_NONE, then try_format didn't clamp
> the width and height. This can happen with v4l2-compliance tests.
> 
> Always clamp.
> 
> This fixes this 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/ispccp2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

diff --git a/drivers/media/platform/ti/omap3isp/ispccp2.c 
b/drivers/media/platform/ti/omap3isp/ispccp2.c
index f4147c79639c..d668111b44f4 100644
--- a/drivers/media/platform/ti/omap3isp/ispccp2.c
+++ b/drivers/media/platform/ti/omap3isp/ispccp2.c
@@ -658,7 +658,7 @@ static void ccp2_try_format(struct isp_ccp2_device *ccp2,
                        fmt->height = clamp_t(u32, fmt->height,
                                              ISPCCP2_DAT_SIZE_MIN,
                                              ISPCCP2_DAT_SIZE_MAX);
-               } else if (ccp2->input == CCP2_INPUT_MEMORY) {
+               } else {
                        fmt->width = clamp_t(u32, fmt->width,
                                             ISPCCP2_LCM_HSIZE_COUNT_MIN,
                                             ISPCCP2_LCM_HSIZE_COUNT_MAX);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to