- Oct 18, 2023
-
-
Benjamin Gaignard authored
Allow test drivers to use DELETE_BUFS by adding vb2_ioctl_delete_bufs() helper. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Create v4l2-mem2mem helpers for VIDIOC_DELETE_BUFS ioctl. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
VIDIOC_DELETE_BUFS ioctl allows to delete buffers from a queue. The number of buffers to delete in given by count field of struct v4l2_delete_buffers and the range start at the index specified in the same structure. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Improve __vb2_queue_free() and __vb2_free_mem() to free range of buffers and not only the last few buffers. Intoduce starting index to be flexible on range and change the loops according to this parameters. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Add a bitmap field to know which of bufs array entries are used or not. Remove no more used num_buffers field from queue structure. Use bitmap_find_next_zero_area() to find the first possible range when creating new buffers to fill the gaps. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
When DELETE_BUFS will be introduced holes could created in bufs array. To be able to reuse these unused indices reworking how create->index is set is mandatory. Let __vb2_queue_alloc() decide which first index is correct and forward this to the caller. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Remove all checks that prohibit to set a new format while streaming. This allow to change dynamically the resolution if the pixel format remains the same. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> CC: Philipp Zabel <p.zabel@pengutronix.de>
-
Benjamin Gaignard authored
offsets HEVC and VP9 are running on the same hardware and share the same chroma and motion vectors offset constraint. Create common helpers functions for these computation. Source and destination buffer height may not be the same because alignment constraint are different so use destination height to compute chroma offset because we target this buffer as hardware output. To be able to use the helpers in both VP9 HEVC code remove dec_params and use context->bit_depth instead. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> CC: Philipp Zabel <p.zabel@pengutronix.de>
-
Benjamin Gaignard authored
Store computed values of chroma and motion vectors offset because they depends on width and height values which change if the resolution change. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> CC: Philipp Zabel <p.zabel@pengutronix.de>
-
Benjamin Gaignard authored
Since vb2 queue can store more than VB2_MAX_FRAME buffers, the postprocessor buffer storage must be capable to store more buffers too. Change static dec_q array to allocated array to be capable to store up to queue 'max_num_buffers'. Keep allocating queue 'num_buffers' at queue setup time but also allows to allocate postprocessors buffers on the fly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> CC: Philipp Zabel <p.zabel@pengutronix.de>
-
Benjamin Gaignard authored
Allow to allocated up to 64 buffers on capture queue. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Change the maximum number of buffers of some capture queues in order to test max_num_buffers field. Allow to allocate up to: - 64 buffers for video capture queue. - 1024 buffers for sdr capture queue. - 32768 buffers for vbi capture queue. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use one of the struct v4l2_create_buffers reserved bytes to report the maximum possible number of buffers for the queue. V4l2 framework set V4L2_BUF_CAP_SUPPORTS_SET_MAX_BUFS flags in queue capabilities so userland can know when the field is valid. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Add 'max_num_buffers' field in vb2_queue struct to let drivers decide how many buffers could be stored in a queue. This require 'bufs' array to be allocated at queue init time and freed when releasing the queue. By default VB2_MAX_FRAME remains the limit. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Antti Palosaari <crope@iki.fi>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Joseph Liu <kwliu@nuvoton.com> CC: Marvin Lin <kflin@nuvoton.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> CC: Maxime Ripard <mripard@kernel.org>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henrik Rydberg <rydberg@bitmath.org>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Neil Armstrong <neil.armstrong@linaro.org>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Steve Longerbeam <slongerbeam@gmail.com> CC: Philipp Zabel <p.zabel@pengutronix.de>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. If 'min_buffers_needed' is set remove useless checks in queue setup functions. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Daniel Almeida <daniel.almeida@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Rui Miguel Silva <rmfrfs@gmail.com> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com> CC: Martin Kepplinger <martink@posteo.de>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Philipp Zabel <p.zabel@pengutronix.de>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Matt Ranostay <matt.ranostay@konsulko.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Sergey Kozlov <serjk@netup.ru> CC: Abylay Ospan <aospan@netup.ru>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Sergey Kozlov <serjk@netup.ru> CC: Abylay Ospan <aospan@netup.ru>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
-
Benjamin Gaignard authored
min_buffers_needed is already set to 2 so remove this useless check. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> CC: Antti Palosaari <crope@iki.fi>
-
Benjamin Gaignard authored
The above memset already zeroed all the ctx fields, it is useless to do it here again. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_buffer() instead of direct access to the vb2_queue bufs array. This allows us to change the type of the bufs in the future. After each call to vb2_get_buffer() we need to be sure that we get a valid pointer so check the return value of all of them. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> CC: Sakari Ailus <sakari.ailus@linux.intel.com>
-