linux/drivers/media/platform/raspberrypi/rp1-cfe
Tomi Valkeinen 57b5a302b5 media: raspberrypi: cfe: Fix min_reqbufs_allocation
The driver checks if "vq->max_num_buffers + *nbuffers < 3", but
vq->max_num_buffers is (by default) 32, so the check is never true. Nor
does the check make sense.

The original code in the BSP kernel was "vq->num_buffers + *nbuffers <
3", but got mangled along the way to upstream. The intention was to make
sure that at least 3 buffers are allocated.

Fix this by removing the bad lines and setting q->min_reqbufs_allocation
to three.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-06-17 10:51:35 +02:00
..
cfe-fmts.h
cfe-trace.h
cfe.c media: raspberrypi: cfe: Fix min_reqbufs_allocation 2025-06-17 10:51:35 +02:00
cfe.h
csi2.c
csi2.h
dphy.c
dphy.h
Kconfig
Makefile
pisp-fe.c
pisp-fe.h