dmaengine and using tx descriptors multiple times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vinod,

I've been writing the dmaengine slave driver for pxa architecture lately. I have
only one remaining concern with descriptors reusing, and I need your input.

My usecase is as follows, from a driver point of view :
 - tx = dmaengine_prep_slave_sg(dma_chan, sg, sglen, DMA_PREP_CONTINUE);
 - dma_map_sg(dev, sg, sglen, DMA_DEV_TO_MEM)
 - dmaengine_submit(tx)
 - dma_async_issue_pending(dma_chan);
 - ... wait for tx->callback()
   => here, because of DMA_PREP_CONTINUE, the hardware descriptors are not
   freed, as what I need to reuse

 - dma_sync_sg_for_cpu(dev, sg, sglen, )
 - copy video buffer somewhere (or not if frame interleaving)

 - dmaengine_submit(tx)
 - dma_async_issue_pending(dma_chan)
   => the video buffer is captured again, so far so good
 - ... wait for tx->callback()

And here comes my question : how do I free the hardware descriptors for tx now ?
As I chose to not free them upon tx completion, is there an API call to do it ?

Cheers.

-- 
Robert
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux