- Sep 27, 2023
-
-
Benjamin Gaignard authored
Do not allow down scaling if the source buffer resolution is smaller than destination one. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Fixes: fbb6c848 ("media: destage Hantro VPU driver")
-
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
Use vb2_get_num_buffers() and queue max_num_buffers field to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2 queue_setup checks for a minimum number of buffers so set min_buffers_needed to 2 and remove the useless check in usbtv_queue_setup(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2 queue_setup checks for a minimum number of buffers so set min_buffers_needed to 8 and remove the useless check in hackrf_queue_setup(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2 queue_setup checks for a minimum number of buffers so set min_buffers_needed to aCX231XX_MIN_BUFnd remove the useless check in cx231xx queue_setup(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2 queue_setup checks for a minimum number of buffers so set min_buffers_needed to 8 and remove the useless check in airspy_queue_setup(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. If min_buffers_needed is set remove useless checks. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
When queue min_buffers_needed field is correctly set vb2 queue_setup() does take care of it and we can remove the checks from drivers. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2 queue_setup checks for a minimum number of buffers so set min_buffers_needed to 16 and remove the useless check in rcar_drif_queue_setup(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2 queue_setup checks for a minimum number of buffers so set min_buffers_needed to 3 and remove the useless check in tw686x_queue_setup(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Remove tot_bufs < 2 test because min_buffers_needed is already set to 2. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2 core tests this already so remove it. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
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
Set queue min_buffers_needed field to 3 and remove the useless check. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2 queue_setup checks for a minimum number of buffers so set min_buffers_needed to 2 and remove the useless check in video-i2c queue_setup(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
queue_setup checks for a minimum number of buffers so use queue min_buffers_needed field and remove the check done in rtl2832_sdr_queue_setup(). Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
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
In the future a side effect of introducing DELETE_BUFS ioctl is the create of 'holes' (i.e. unused buffers) in bufs arrays. To know which entries of the bufs arrays are used a bitmap will be added in struct vb2_queue. That will also mean that the number of buffers will be computed given the number of bit set in this bitmap. To smoothly allow this evolution all drives must stop using directly num_buffers field from struct vb2_queue. Let do it in 4 steps: - Introduce vb2_get_num_buffers() helper - Rework how create_bufs first buffer index is computed - Rework all drivers to remove direct calls to queue num_buffers - Replace num_buffers by a bitmap. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Benjamin Gaignard authored
vb2_get_buffer() already checks if the requested index is valid. Stop duplicating this kind of check everywhere. 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>
-
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>
-
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>
-
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>
-
Benjamin Gaignard authored
Allow to allocated up to 64 buffers on capture queue. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
-