public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Jiri Kosina <trivial@kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/4] media: pxa_camera: conversion to dmaengine
Date: Sun, 30 Aug 2015 21:34:54 +0200	[thread overview]
Message-ID: <87613w1sf5.fsf@belgarion.home> (raw)
In-Reply-To: <Pine.LNX.4.64.1508301440460.29683@axis700.grange> (Guennadi Liakhovetski's message of "Sun, 30 Aug 2015 14:55:04 +0200 (CEST)")

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

      reply	other threads:[~2015-08-30 19:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 19:39 [PATCH v3 0/4] media: pxa_camera conversion to dmaengine Robert Jarzmik
2015-07-29 19:39 ` [PATCH v3 1/4] media: pxa_camera: fix the buffer free path Robert Jarzmik
2015-07-29 19:39 ` [PATCH v3 2/4] media: pxa_camera: move interrupt to tasklet Robert Jarzmik
2015-07-29 19:39 ` [PATCH v3 3/4] media: pxa_camera: trivial move of dma irq functions Robert Jarzmik
2015-08-30 11:14   ` Guennadi Liakhovetski
2015-08-30 19:29     ` Robert Jarzmik
2015-07-29 19:39 ` [PATCH v3 4/4] media: pxa_camera: conversion to dmaengine Robert Jarzmik
2015-08-30 12:55   ` Guennadi Liakhovetski
2015-08-30 19:34     ` Robert Jarzmik [this message]

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=87613w1sf5.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=trivial@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox