Re: [PATCH 3/3] Documentation: dmaengine: Add DMA_CTRL_REUSE documentation

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

 



Vinod Koul <vinod.koul@xxxxxxxxx> writes:

> +  * DMA_CTRL_REUSE
> +    - If set, the descriptor can be reused after being completed. It should
> +      not be freed by provider if this flag is set.
> +    - The descriptor should be prepared for reuse by invoking
> +      dmaengine_desc_set_reuse() which will set DMA_CTRL_REUSE.
> +    - dmaengine_desc_set_reuse() will succeed only when channel support
> +      reusable descriptor as exhibited by capablities
> +    - As a consequence, if a device driver wants to skip the dma_map_sg() and
> +      dma_unmap_sg() in between 2 transfers, because the DMA'd data wasn't used,
> +      it can resubmit the transfer right after its completion.
> +    - Descriptor can be freed in few ways
> +	- Clearing DMA_CTRL_REUSE by invoking dmaengine_desc_clear_reuse()
> +	  and submitting for last txn
> +	- Explicitly invoking dmaengine_desc_free(), this can succeed only
> +	  when DMA_CTRL_REUSE is already set

> +	- Terminating the channel
Is this last condition mandatory, or can it be transformed into :
 - Clearing DMA_CTRL_REUSE and terminating the channel

The reason I'm asking this is for this kind of scenario :
 - 4 video buffers are prepared and submitted (ie. 4 txs)
 - 1st video buffer completes
 - 2nd video buffer starts, and an error occurs in this 2nd buffer
   => the driver will terminate the DMA channel to stop the transmission
 - the driver will wait for the next "start of frame" of the camera sensor
 - and then it will start 3rd video buffer
   => in this case, the 3rd video will be reused, even if the channel was
   terminated
   
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