All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: ospite@studenti.unina.it, mike@compulab.co.il,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] pxa_camera: Redesign DMA handling
Date: Wed, 04 Mar 2009 19:11:24 +0100	[thread overview]
Message-ID: <87bpsh2m5v.fsf@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0903030929160.5059@axis700.grange> (Guennadi Liakhovetski's message of "Tue\, 3 Mar 2009 16\:49\:51 +0100 \(CET\)")

Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:

> (moved to the new v4l list)
>
>> The DMA transfers in pxa_camera showed some weaknesses in
>> multiple queued buffers context :
>>  - poll/select problem
>>    The order between list pcdev->capture and DMA chain was
>>    not the same. This creates a discrepancy between video
>>    buffers marked as "done" by the IRQ handler, and the
>>    really finished video buffer.
>
> Could you please describe where and how the order could get wrong?
Sorry, I missed that point in the previous reply.

It's still the same bit of code :
-                       } else {
-                               buf_dma->sg_cpu[nents].ddadr =
-                                       DDADR(pcdev->dma_chans[i]);

That chains the end of the queued buffer to the active buffer (probably the one
running in DMA chain [1]). So we'll get images in the following order:

 <queued_buffer>, then <active_buffer (head of pcdev->capture)>, then <others>.

The desired order is :
 <active_buffer (head of pcdev->capture)>, then <others>, then <queued_buffer>.

>>  - multiple buffers DMA starting
>>    When multiple buffers were queued, the DMA channels were
>
> You mean multiple scatter-gather elements?
No, I mean multiple video buffers.
Multiple scatter-gather elements form one video buffer, and multiple video
buffers are queued to form a list of images (video stream).

Cheers.

--
Robert

[1] I mean _probably_, because the DMA chain can be already ahead of 1 buffer
(we're talking in terms of PXA cycles, which is very hard to watch), while
active pointer is not yet updated.

  parent reply	other threads:[~2009-03-04 18:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 19:17 [PATCH] pxa_camera: Redesign DMA handling Robert Jarzmik
2009-03-03  7:26 ` Mike Rapoport
2009-03-03 15:49 ` Guennadi Liakhovetski
2009-03-03 18:47   ` Robert Jarzmik
2009-03-07 23:11     ` Guennadi Liakhovetski
2009-03-08  0:39       ` Robert Jarzmik
2009-03-04 18:11   ` Robert Jarzmik [this message]
2009-03-11 12:22     ` Guennadi Liakhovetski
     [not found] <722242271.3317321236779109198.JavaMail.root@zimbra20-e3.priv.proxad.net>
2009-03-11 13:48 ` robert.jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bpsh2m5v.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=ospite@studenti.unina.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.