lkml.org 
[lkml]   [2015]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 4/4] media: pxa_camera: conversion to dmaengine
Date
Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:

>> + last_buf = list_entry(pcdev->capture.prev,
>> + struct pxa_buffer, vb.queue);
>
> You can use list_last_entry()
Ok.

>> + last_status = dma_async_is_tx_complete(pcdev->dma_chans[chan],
>> + last_buf->cookie[chan],
>> + NULL, &last_issued);
>> + if (camera_status & overrun &&
>> + last_status != DMA_COMPLETE) {
>> + dev_dbg(dev, "FIFO overrun! CISR: %x\n",
>> + camera_status);
>> + pxa_camera_stop_capture(pcdev);
>> + list_for_each_entry(buf, &pcdev->capture, vb.queue)
>> + pxa_dma_add_tail_buf(pcdev, buf);
>
> Why have you added this loop? Is it a bug in the current implementation or
> is it only needed with the switch to dmaengine?
It's a consequence of the switch.

With dmaengine, a dmaengine_terminate_all() removes all queued txs. It is
therefore necessary to requeue them. In the previous implementation, the
chaining was still good, and it was "enough" to just queue the first
videobuffer : the other buffers would follow by chaining.

Cheers.

--
Robert


\
 
 \ /
  Last update: 2015-08-30 22:01    [W:0.071 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site