OSDN Git Service

[media] rcar-vin: select capture mode based on free buffers
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 24 May 2017 00:15:34 +0000 (21:15 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Jun 2017 17:43:06 +0000 (14:43 -0300)
commit996ce3afbe33617c9c21b4a50a92a266d70c0b8b
treefd29174d7e8c03c21ee0d9daf18fcf9d1be5d50b
parent9e9214478a90bd9ed6db8dd4612c026e74e328ed
[media] rcar-vin: select capture mode based on free buffers

Instead of selecting single or continuous capture mode based on how many
buffers userspace intends to give us select capture mode based on number
of free buffers we can allocate to hardware when the stream is started.

This change is a prerequisite to enable the driver to switch from
continuous to single capture mode (or the other way around) when the
driver is stalled by userspace not feeding it buffers as fast as it
consumes it.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar-vin/rcar-dma.c