10 Jun, 2015
1 commit
-
This was never added for some reason, so add it now.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
12 May, 2015
1 commit
-
If the last buffer was dequeued from a capture queue, let poll return
immediately and let DQBUF return -EPIPE to signal there will no more
buffers to dequeue until STREAMOFF.
The driver signals the last buffer by setting the V4L2_BUF_FLAG_LAST.
To reenable dequeuing on the capture queue, the driver must explicitly
call vb2_clear_last_buffer_queued. The last buffer queued flag is
cleared automatically during STREAMOFF.Signed-off-by: Philipp Zabel
Acked-by: Hans Verkuil
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab
10 Apr, 2015
1 commit
-
The first time b is used, it is assigned to the first element of the rdy_queue
list. There is no need to set it to NULL before.Signed-off-by: Philipp Zabel
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab
22 Jul, 2014
1 commit
-
Some drivers might allow to decode remaining frames from an internal ringbuffer
after a decoder stop command. Allow those to call v4l2_m2m_try_schedule
directly.Signed-off-by: Michael Olbrich
Signed-off-by: Philipp Zabel
Signed-off-by: Mauro Carvalho Chehab
05 Jul, 2014
1 commit
-
This patch makes the queue lock taken in v4l2_m2m_poll interruptible.
Signed-off-by: Philipp Zabel
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
05 Dec, 2013
1 commit
-
This patch adds ioctl helpers to the V4L2 mem-to-mem API, so we can avoid
several ioctl handlers in the mem-to-mem video node drivers that are simply
a pass-through to the v4l2_m2m_* calls. These helpers will only be useful
for drivers that use same mutex for both OUTPUT and CAPTURE queue, which
is the case for all currently in tree v4l2 m2m drivers. In order to use
the helpers the drivers are required to use struct v4l2_fh.Signed-off-by: Sylwester Nawrocki
Signed-off-by: Kyungmin Park
Acked-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
29 Oct, 2013
3 commits
-
When the current context is running,
1] If release is called, it waits until the job is finished.
2] As soon as the job is finished, v4l2_mem_ctx_release()tries to
release the vb2 queues.
3] But if the current context can be scheduled in the v4l2_m2m_job_finish()
it schedules the context and tries to call device_run().
4] As the release() and device_run() sequence can't be predicted sometimes
device_run() may get empty vb2 buffers.This patch adds the ABORT state to the job_flags. Once the job_abort() or
release() is called on the context, the same context will not be scheduled in
the v4l2_m2m_job_finish().Signed-off-by: Shaik Ameer Basha
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab -
v4l2_m2m_streamoff drops the list of ready buffers but failed to reset the
num_rdy counter to zero. This would lead to v4l2_m2m_num_src/dst_bufs_ready
reporting wrong values after streamoff.Signed-off-by: Philipp Zabel
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab -
Just clearing the m2m_ctx->queue list_head will leave the m2m_dev->job_queue
in a broken state and can cause scheduling of device_runs after streamoff was
called.Signed-off-by: Philipp Zabel
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab
24 Aug, 2013
1 commit
-
When streamoff is called on the context and the context
is added to the job_queue,
1] sometimes device_run receives the empty vb2 buffers (as
v4l2_m2m_streamoff is dropping the ready queue).
2] sometimes v4l2_m2m_job_finish may not succeed as the m2m_dev->curr_ctx
is made NULL in the v4l2_m2m_streamoff()
The above points may stop the execution of the other queued contexts.
This patch makes sure that before streamoff is executed on any context,
that context should "not be running" or "not queued" in the job_queue.
1] If the current context is running, then abort job will be called.
2] If the current context is queued, then the context will be removed from
the job_queue.Signed-off-by: Shaik Ameer Basha
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab
26 Jul, 2013
1 commit
-
On mem2mem decoders with a hardware bitstream ringbuffer, to drain the
buffer at the end of the stream, remaining frames might need to be decoded
from the bitstream buffer without additional input buffers being provided.
To achieve this, allow a queue to be marked as buffered by the driver, and
allow scheduling of device_runs when buffered ready queues are empty.
This also allows a driver to copy input buffers into their bitstream
ringbuffer and immediately mark them as done to be dequeued.
The motivation for this patch is hardware assisted h.264 reordering support
in the coda driver. For high profile streams, the coda can hold back
out-of-order frames, causing a few mem2mem device runs in the beginning, that
don't produce any decompressed buffer at the v4l2 capture side. At the same
time, the last few frames can be decoded from the bitstream with mem2mem device
runs that don't need a new input buffer at the v4l2 output side. The decoder
command ioctl can be used to put the decoder into the ringbuffer draining
end-of-stream mode.Signed-off-by: Philipp Zabel
Acked-by: Sylwester Nawrocki
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab
04 Jun, 2013
3 commits
-
Save flags correctly when taking spinlocks in v4l2_m2m_try_schedule.
Signed-off-by: John Sheu
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab -
Signed-off-by: Philipp Zabel
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab -
The v4l2_m2m_poll() does not need to wait if there is already a buffer in
done_list of source and destination queues, but current v4l2_m2m_poll() always
waits. So done_list of each queue is checked before calling poll_wait().Signed-off-by: Seung-Woo Kim
Acked-by: Marek Szyprowski
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab
20 Mar, 2013
1 commit
-
When a v4l2-mem2mem context gets a STREAMOFF call on either its CAPTURE
or OUTPUT queues, we should:
* Drop the corresponding rdy_queue, since a subsequent STREAMON expects
an empty queue.
* Deschedule the context, as it now has at least one empty queue and
cannot run.Signed-off-by: John Sheu
Acked-by: Pawel Osciak
Signed-off-by: Mauro Carvalho Chehab
19 Mar, 2013
1 commit
-
In v4l2_m2m_try_schedule(), use the CAPTURE queue lock when accessing
the CAPTURE queue, instead of relying on just holding the OUTPUT queue
lock.Signed-off-by: John Sheu
Acked-by: Pawel Osciak
Signed-off-by: Mauro Carvalho Chehab
19 Dec, 2012
1 commit
-
The mem2mem core doesn't change struct m2m_ops, provided by the driver,
make references to it const.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
26 Nov, 2012
1 commit
-
This patch adds extension to videobuf2-core. It allow to export an mmap buffer
as a DMABUF file descriptor.Signed-off-by: Tomasz Stanislawski
Signed-off-by: Kyungmin Park
Acked-by: Laurent Pinchart
Acked-by: Hans Verkuil
Tested-by: Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab
29 Oct, 2012
1 commit
-
See following thread for rationale:
http://www.spinics.net/lists/linux-media/msg52462.html
Tested by compilation only.Signed-off-by: Nicolas Thery
Signed-off-by: Mauro Carvalho Chehab
18 Sep, 2012
1 commit
-
Use list_first_entry instead of list_entry which makes the intention
of the code more clear.Signed-off-by: Sascha Hauer
Acked-by: Marek Szyprowski
Acked-by: Pawel Osciak
Signed-off-by: Mauro Carvalho Chehab
14 Aug, 2012
1 commit
-
Currently, the v4l2 core is mixed together with other non-core drivers.
Move them into a separate directory.Signed-off-by: Mauro Carvalho Chehab