Re: [PATCH 1/2] dmaengine: Revert "drivers/dma: remove unused support for MEMSET operations"

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

 



On Tue, Apr 28, 2015 at 02:11:11PM +0200, Maxime Ripard wrote:
> This reverts commit 48a9db462d99494583dad829969616ac90a8df4e.
> 
> Some platforms actually need support for the memset operations. Bring it back.
> 
Bringing memset is fine, but i think you need to remove the
CONFIG_ASYNC_MEMSET parts, i dont see why we need them and not get rid of
async and add clean memset support.

-- 
~Vinod

> Signed-off-by: Maxime Ripard <maxime.ripard@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/dma/dmaengine.c   | 7 +++++++
>  include/linux/dmaengine.h | 5 +++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
> index 0e035a8cf401..0b5e5ac5e75f 100644
> --- a/drivers/dma/dmaengine.c
> +++ b/drivers/dma/dmaengine.c
> @@ -767,6 +767,11 @@ static bool device_has_all_tx_types(struct dma_device *device)
>  		return false;
>  	#endif
>  
> +	#if defined(CONFIG_ASYNC_MEMSET) || defined(CONFIG_ASYNC_MEMSET_MODULE)
> +	if (!dma_has_cap(DMA_MEMSET, device->cap_mask))
> +		return false;
> +	#endif
> +
>  	#if defined(CONFIG_ASYNC_XOR) || defined(CONFIG_ASYNC_XOR_MODULE)
>  	if (!dma_has_cap(DMA_XOR, device->cap_mask))
>  		return false;
> @@ -828,6 +833,8 @@ int dma_async_device_register(struct dma_device *device)
>  		!device->device_prep_dma_pq);
>  	BUG_ON(dma_has_cap(DMA_PQ_VAL, device->cap_mask) &&
>  		!device->device_prep_dma_pq_val);
> +	BUG_ON(dma_has_cap(DMA_MEMSET, device->cap_mask) &&
> +		!device->device_prep_dma_memset);
>  	BUG_ON(dma_has_cap(DMA_INTERRUPT, device->cap_mask) &&
>  		!device->device_prep_dma_interrupt);
>  	BUG_ON(dma_has_cap(DMA_SG, device->cap_mask) &&
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 5d63acb09813..93804abf04c9 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -65,6 +65,7 @@ enum dma_transaction_type {
>  	DMA_PQ,
>  	DMA_XOR_VAL,
>  	DMA_PQ_VAL,
> +	DMA_MEMSET,
>  	DMA_INTERRUPT,
>  	DMA_SG,
>  	DMA_PRIVATE,
> @@ -596,6 +597,7 @@ struct dma_tx_state {
>   * @device_prep_dma_xor_val: prepares a xor validation operation
>   * @device_prep_dma_pq: prepares a pq operation
>   * @device_prep_dma_pq_val: prepares a pqzero_sum operation
> + * @device_prep_dma_memset: prepares a memset operation
>   * @device_prep_dma_interrupt: prepares an end of chain interrupt operation
>   * @device_prep_slave_sg: prepares a slave dma operation
>   * @device_prep_dma_cyclic: prepare a cyclic dma operation suitable for audio.
> @@ -658,6 +660,9 @@ struct dma_device {
>  		struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
>  		unsigned int src_cnt, const unsigned char *scf, size_t len,
>  		enum sum_check_flags *pqres, unsigned long flags);
> +	struct dma_async_tx_descriptor *(*device_prep_dma_memset)(
> +		struct dma_chan *chan, dma_addr_t dest, int value, size_t len,
> +		unsigned long flags);
>  	struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)(
>  		struct dma_chan *chan, unsigned long flags);
>  	struct dma_async_tx_descriptor *(*device_prep_dma_sg)(
> -- 
> 2.3.6
> 

-- 
--
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