• Home
  • Raw
  • Download

Lines Matching refs:desc

42 	struct pt_dma_desc *desc = to_pt_desc(vd);  in pt_do_cleanup()  local
43 struct pt_device *pt = desc->pt; in pt_do_cleanup()
45 kmem_cache_free(pt->dma_desc_cache, desc); in pt_do_cleanup()
48 static int pt_dma_start_desc(struct pt_dma_desc *desc) in pt_dma_start_desc() argument
55 desc->issued_to_hw = 1; in pt_dma_start_desc()
57 pt_cmd = &desc->pt_cmd; in pt_dma_start_desc()
79 struct pt_dma_desc *desc) in pt_handle_active_desc() argument
87 if (desc) { in pt_handle_active_desc()
88 if (!desc->issued_to_hw) { in pt_handle_active_desc()
90 if (desc->status != DMA_ERROR) in pt_handle_active_desc()
91 return desc; in pt_handle_active_desc()
94 tx_desc = &desc->vd.tx; in pt_handle_active_desc()
95 vd = &desc->vd; in pt_handle_active_desc()
102 if (desc) { in pt_handle_active_desc()
103 if (desc->status != DMA_COMPLETE) { in pt_handle_active_desc()
104 if (desc->status != DMA_ERROR) in pt_handle_active_desc()
105 desc->status = DMA_COMPLETE; in pt_handle_active_desc()
109 list_del(&desc->vd.node); in pt_handle_active_desc()
116 desc = pt_next_dma_desc(chan); in pt_handle_active_desc()
125 } while (desc); in pt_handle_active_desc()
132 struct pt_dma_desc *desc = data; in pt_cmd_callback() local
140 dma_chan = desc->vd.tx.chan; in pt_cmd_callback()
144 desc->status = DMA_ERROR; in pt_cmd_callback()
148 desc = pt_handle_active_desc(chan, desc); in pt_cmd_callback()
151 if (!desc) in pt_cmd_callback()
154 ret = pt_dma_start_desc(desc); in pt_cmd_callback()
158 desc->status = DMA_ERROR; in pt_cmd_callback()
165 struct pt_dma_desc *desc; in pt_alloc_dma_desc() local
167 desc = kmem_cache_zalloc(chan->pt->dma_desc_cache, GFP_NOWAIT); in pt_alloc_dma_desc()
168 if (!desc) in pt_alloc_dma_desc()
171 vchan_tx_prep(&chan->vc, &desc->vd, flags); in pt_alloc_dma_desc()
173 desc->pt = chan->pt; in pt_alloc_dma_desc()
174 desc->pt->cmd_q.int_en = !!(flags & DMA_PREP_INTERRUPT); in pt_alloc_dma_desc()
175 desc->issued_to_hw = 0; in pt_alloc_dma_desc()
176 desc->status = DMA_IN_PROGRESS; in pt_alloc_dma_desc()
178 return desc; in pt_alloc_dma_desc()
189 struct pt_dma_desc *desc; in pt_create_desc() local
192 desc = pt_alloc_dma_desc(chan, flags); in pt_create_desc()
193 if (!desc) in pt_create_desc()
196 pt_cmd = &desc->pt_cmd; in pt_create_desc()
204 pt_cmd->data = desc; in pt_create_desc()
206 desc->len = len; in pt_create_desc()
208 return desc; in pt_create_desc()
215 struct pt_dma_desc *desc; in pt_prep_dma_memcpy() local
217 desc = pt_create_desc(dma_chan, dst, src, len, flags); in pt_prep_dma_memcpy()
218 if (!desc) in pt_prep_dma_memcpy()
221 return &desc->vd.tx; in pt_prep_dma_memcpy()
228 struct pt_dma_desc *desc; in pt_prep_dma_interrupt() local
230 desc = pt_alloc_dma_desc(chan, flags); in pt_prep_dma_interrupt()
231 if (!desc) in pt_prep_dma_interrupt()
234 return &desc->vd.tx; in pt_prep_dma_interrupt()
240 struct pt_dma_desc *desc; in pt_issue_pending() local
246 desc = pt_next_dma_desc(chan); in pt_issue_pending()
247 if (desc) in pt_issue_pending()
252 desc = pt_next_dma_desc(chan); in pt_issue_pending()
257 if (engine_is_idle && desc) in pt_issue_pending()
258 pt_cmd_callback(desc, 0); in pt_issue_pending()
287 struct pt_dma_desc *desc = NULL; in pt_resume() local
292 desc = pt_next_dma_desc(chan); in pt_resume()
296 if (desc) in pt_resume()
297 pt_cmd_callback(desc, 0); in pt_resume()