Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716390

Re: [PATCH] dmaengine: qcom-bam: Process multiple pending descriptors

From Sricharan R <sricharan@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH] dmaengine: qcom-bam: Process multiple pending descriptors
Date 2017-08-21 14:20 +0200
Message-ID <ugTQu-4ge-17@gated-at.bofh.it> (permalink)
References <tPIpI-6D4-33@gated-at.bofh.it> <tSugx-621-3@gated-at.bofh.it> <tSEpz-3Kz-5@gated-at.bofh.it> <tTm7g-7MM-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Vinod,

<snip>

>>>>  	async_desc->num_desc = num_alloc;
>>>>  	async_desc->curr_desc = async_desc->desc;
>>>> @@ -680,13 +684,18 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
>>>>  static int bam_dma_terminate_all(struct dma_chan *chan)
>>>>  {
>>>>  	struct bam_chan *bchan = to_bam_chan(chan);
>>>> +	struct bam_async_desc *async_desc;
>>>>  	unsigned long flag;
>>>>  	LIST_HEAD(head);
>>>>  
>>>>  	/* remove all transactions, including active transaction */
>>>>  	spin_lock_irqsave(&bchan->vc.lock, flag);
>>>>  	if (bchan->curr_txd) {
>>>> -		list_add(&bchan->curr_txd->vd.node, &bchan->vc.desc_issued);
>>>> +		list_for_each_entry(async_desc, &bchan->desc_list, desc_node) {
>>>> +			bchan->curr_txd = async_desc;
>>>> +			list_add(&bchan->curr_txd->vd.node,
>>>> +				 &bchan->vc.desc_issued);
>>>
>>> that is wrong, terminated should not add to issued list
>>
>>  hmm, since it was already done like that, i added the same for list of descriptors now.
> 
> Sounds like you should fix existing behaviour too :)
> 

 Just to clarify, the code below this, does a vchan_dma_desc_free_list, which
 removes the descriptors from issued list as well. So this is to pull and remove even all
 those descriptors submitted to the hardware as well. That said, posted a V3 and it
 would cause a conflict with https://patchwork.kernel.org/patch/9874691/ based on which goes
 in first.
 
Regards,
 Sricharan

-- 
"QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] dmaengine: qcom-bam: Process multiple pending descriptors Sricharan R <sricharan@codeaurora.org> - 2017-08-21 14:20 +0200

csiph-web