]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: rcar-vin: Remove superfluous starting state
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Mon, 10 Feb 2025 17:56:13 +0000 (18:56 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 25 Apr 2025 08:15:27 +0000 (10:15 +0200)
commit25482a986e44fddd3af77458071fbbd222795917
tree9ed2db6c18e52d492de80b65b2bb6eb16ab103b7
parent1dadd89b58108d3df701d6d9e19cd34818f97f7f
media: rcar-vin: Remove superfluous starting state

The STARTING state is superfluous and can be replaced with a check of
the sequence counter. The design idea is that the first buffer returned
from the driver have to come from the first hardware buffer slot.
Failing this the first 3 buffers queued to the device can be returned
out-of-order.

But it's much clearer to check the sequence counter to only return the
first buffer if it comes from hardware slot 0 then it is to carry around
an extra state just for this. Remove the unneeded state and replace it
with a simpler check.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/renesas/rcar-vin/rcar-dma.c
drivers/media/platform/renesas/rcar-vin/rcar-vin.h