On Tue, 19 Dec 2023 18:50:02 +0100 Paul Cercueil paul@crapouillou.net wrote:
The buffer-dma code was using two queues, incoming and outgoing, to manage the state of the blocks in use.
While this totally works, it adds some complexity to the code, especially since the code only manages 2 blocks. It is much easier to just check each block's state manually, and keep a counter for the next block to dequeue.
Since the new DMABUF based API wouldn't use the outgoing queue anyway, getting rid of it now makes the upcoming changes simpler.
With this change, the IIO_BLOCK_STATE_DEQUEUED is now useless, and can be removed.
Signed-off-by: Paul Cercueil paul@crapouillou.net
I've applied this in interests in reducing the outstanding set of patches and because it stands fine as on its own.
Applied to the togreg branch of iio.git and pushed out as testing. Note this is now almost certainly 6.9 material given timing.
Jonathan