Laxman Dewangan wrote at Wednesday, January 25, 2012 6:46 PM:Ok, I will push that patches first and then we can go for this patch.On Wednesday 25 January 2012 10:33 PM, Stephen Warren wrote:Laxman Dewangan wrote at Wednesday, January 25, 2012 4:20 AM:Allow the transfer size to vary in each DMA request,
Still issue may come when we need to read the transfered count from dmaSo I assume you need to make some/all of those modifications before we can
through status register whether it has completed the old and started new
one or still on old req. This can be resolved by having proper lock
between the isr and reading status so that if isr clears the
interrupt_done, just raise a flag that int_done arrive and so
get-active_count() function can handle it properly before workqueu get
scheduled. I am seeing that there is missing synchronization between
int_done status and get_active_count().
I am also thinking that we can remove the work queue and handle the
queue management in isr only
apply this patch?
I agree that many issues are there in this piece of code.Oh right... Maybe I'm misunderstanding continuous mode works then; IActually looking at the current continuous mode, I'm not convinced thatWe are removing the old req from list in handling of full buffer
it correctly handles replacing an in-progress buffer with a new buffer;
I certainly see where handle_continuous_dma() checks for a second (SW)
queued buffer and tells the HW to use that buffer instead, but I don't
see where the (SW) queue management is done; where is the old req removed
from the head of ch->list and marked complete? I assume the "out of sync"
case is only intended to be an error condition and not part of the
buffer switch?
interrupt handling.
660 } else if (req->buffer_status ==
661 TEGRA_DMA_REQ_BUF_STATUS_HALF_FULL) {
:::::::::::::::::::::::::::::::::::::::
670 req->buffer_status =
TEGRA_DMA_REQ_BUF_STATUS_FULL;
671 req->bytes_transferred = bytes_transferred;
672 req->status = TEGRA_DMA_REQ_SUCCESS;
673 list_del(&req->node);
thought that the client driver queued a request once, and it continued
to execute forever until either a new request was queued to replace it,
or the original request for dequeued. It looks like instead, the req
is always removed from the queue once we've seen both the ping and the
pong interrupts. Am I totally misunderstanding what's happening?