10 Jun, 2015

1 commit


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

    Philipp Zabel
     

10 Apr, 2015

1 commit


22 Jul, 2014

1 commit


05 Jul, 2014

1 commit


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

    Sylwester Nawrocki
     

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

    Shaik Ameer Basha
     
  • 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

    Philipp Zabel
     
  • 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

    Philipp Zabel
     

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

    Shaik Ameer Basha
     

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

    Philipp Zabel
     

04 Jun, 2013

3 commits


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

    John Sheu
     

19 Mar, 2013

1 commit


19 Dec, 2012

1 commit


26 Nov, 2012

1 commit


29 Oct, 2012

1 commit


18 Sep, 2012

1 commit


14 Aug, 2012

1 commit