Re: [PATCH v10 2/3] dmaengine: ptdma: register PTDMA controller as a DMA resource

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

 




On 7/28/2021 11:45 AM, Vinod Koul wrote:
> [CAUTION: External Email]
> 
> On 20-06-21, 11:41, Sanjay R Mehta wrote:
>> From: Sanjay R Mehta <sanju.mehta@xxxxxxx>
>>
>> Register ptdma queue to Linux dmaengine framework as general-purpose
>> DMA channels.
> 
> Mostly looks good, one question below:
> 
>> +static struct pt_dma_desc *pt_alloc_dma_desc(struct pt_dma_chan *chan,
>> +                                          unsigned long flags)
>> +{
>> +     struct pt_dma_desc *desc;
>> +
>> +     desc = kmem_cache_zalloc(chan->pt->dma_desc_cache, GFP_NOWAIT);
>> +     if (!desc)
>> +             return NULL;
>> +
>> +     vchan_tx_prep(&chan->vc, &desc->vd, flags);
>> +
>> +     desc->pt = chan->pt;
>> +     desc->issued_to_hw = 0;
>> +     desc->status = DMA_IN_PROGRESS;
> 
> where is this descriptor freed?
> 
This descriptor is freed in the pt_do_cleanup() function.
pt_do_cleanup() is set as a callback routine for "chan->vc.desc_free" in
the init code.

- Sanjay.

> --
> ~Vinod
> 



[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