summaryrefslogtreecommitdiff
path: root/drivers/media/test-drivers/visl
AgeCommit message (Collapse)AuthorFilesLines
2024-03-25media: v4l2: Add mem2mem helpers for REMOVE_BUFS ioctlBenjamin Gaignard1-0/+1
Create v4l2-mem2mem helpers for VIDIOC_REMOVE_BUFS ioctl and make test drivers use it. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-02-16media: visl: Add codec specific variability on output framesDetlev Casanova1-0/+36
When running tests with different input data, the stable output frames could be too similar and hide possible issues. This commit adds variation by using some codec specific parameters. Only HEVC and H.264 support this. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: add media: prefix to Subject]
2024-02-16media: visl: Add a tpg_verbose parameterDetlev Casanova3-118/+153
The text written on the output frames stable for a given input. Remove the unstable elements like pointers, buffer indexes or queues status so that frames are always identical and can be compared against a reference in automatic tests. As the unstable information can be relevant when debugging the API, add a tpg_verbose parameter to show them. Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: correct a few small checkpatch issues]
2024-02-16media: visl,vidtv: Set parameters permissions to 0444Detlev Casanova1-5/+5
This avoids confusion with default values and lets userspace programs get the modules parameters values at run time. This can be useful when setting up a test suite. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-12-07media: visl: Add AV1 supportDetlev Casanova8-1/+435
Let the visl test driver accept the AV1 pixel format. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Tested-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-11-23media: visl: Hook the (TRY_)DECODER_CMD stateless ioctlsPaul Kocialkowski1-0/+3
The (TRY_)DECODER_CMD ioctls are used to support flushing when holding capture buffers is supported. This is the case of this driver but the ioctls were never hooked to the ioctl ops. Add them to correctly support flushing. Fixes: 0c078e310b6d ("media: visl: add virtual stateless decoder driver") Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-11-23media: drop CONFIG_MEDIA_CONTROLLER_REQUEST_APIHans Verkuil1-1/+0
This config option was added during the development of the Request API to make it easy to disable it. The Request API is now stable so it is time to drop this option altogether. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-11-23media: test-drivers: Stop direct calls to queue num_buffers fieldBenjamin Gaignard1-2/+2
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> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-11-23media: visl: Use vb2_get_buffer() instead of directly access to buffers arrayBenjamin Gaignard1-7/+21
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> Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> CC: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2023-04-11media: visl-core: Convert to platform remove callback returning voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-02-08media: visl: make visl_qops staticHans Verkuil1-1/+1
This struct can be static. This fixes a sparse warning: visl-video.c:690:22: warning: symbol 'visl_qops' was not declared. Should it be static? Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Cc: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-11-25media: visl: add virtual stateless decoder driverDaniel Almeida17-0/+3643
A virtual stateless device for stateless uAPI development purposes. This tool's objective is to help the development and testing of userspace applications that use the V4L2 stateless API to decode media. A userspace implementation can use visl to run a decoding loop even when no hardware is available or when the kernel uAPI for the codec has not been upstreamed yet. This can reveal bugs at an early stage. This driver can also trace the contents of the V4L2 controls submitted to it. It can also dump the contents of the vb2 buffers through a debugfs interface. This is in many ways similar to the tracing infrastructure available for other popular encode/decode APIs out there and can help develop a userspace application by using another (working) one as a reference. Note that no actual decoding of video frames is performed by visl. The V4L2 test pattern generator is used to write various debug information to the capture buffers instead. Signed-off-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>