linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH v2 3/4] pxa_camera: Redesign DMA handling
Date: Mon, 16 Mar 2009 20:36:17 +0100	[thread overview]
Message-ID: <87hc1tdzv2.fsf@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0903161153200.4409@axis700.grange> (Guennadi Liakhovetski's message of "Mon\, 16 Mar 2009 12\:22\:34 +0100 \(CET\)")

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

> What is QIF? Do you mean Quick Capture Interface - QCI? I also see CIF 
> used in the datasheet, probably, for "Capture InterFace," but I don't see 
> QIF anywhere. Also, please explain the first time you use the 
> abbreviation. Also fix it in the commit message to patch 1/4.
OK, will replace with QCI, my bad.

And OK for all the other typos in pxa_camera.txt

>> +static void pxa_dma_update_sg_tail(struct pxa_camera_dev *pcdev,
>> +				   struct pxa_buffer *buf)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < pcdev->channels; i++)
>> +		pcdev->sg_tail[i] = buf->dmas[i].sg_cpu + buf->dmas[i].sglen;
>> +}
>> +
>> +static void pxa_dma_add_tail_buf(struct pxa_camera_dev *pcdev,
>> +				 struct pxa_buffer *buf)
>> +{
>> +	int i;
>> +	struct pxa_dma_desc *buf_last_desc;
>> +
>> +	for (i = 0; i < pcdev->channels; i++) {
>> +		buf_last_desc = buf->dmas[i].sg_cpu + buf->dmas[i].sglen;
>> +		buf_last_desc->ddadr = DDADR_STOP;
>> +
>> +		if (!pcdev->sg_tail[i])
>> +			continue;
>> +		pcdev->sg_tail[i]->ddadr = buf->dmas[i].sg_dma;
>> +	}
>> +
>> +	pxa_dma_update_sg_tail(pcdev, buf);
>
> pxa_dma_update_sg_tail is called only here, why not inline it and also put 
> inside one loop?
As for the inline, I'm pretty sure you know it is automatically done by gcc.

As for moving it inside the loop, that would certainly improve performance. Yet
I find it more readable/maintainable that way, and will leave it. But I won't be
bothered at all if you retransform it back to your view, that's up to you.

Cheers.

--
Robert

  reply	other threads:[~2009-03-16 19:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 23:17 [PATCH v2 0/4] pxa_camera: DMA redesign Robert Jarzmik
2009-03-13 23:17 ` [PATCH v2 1/4] pxa_camera: Enforce YUV422P frame sizes to be 16 multiples Robert Jarzmik
2009-03-13 23:17   ` [PATCH v2 2/4] pxa_camera: remove YUV planar formats hole Robert Jarzmik
2009-03-13 23:17     ` [PATCH v2 3/4] pxa_camera: Redesign DMA handling Robert Jarzmik
2009-03-13 23:17       ` [PATCH v2 4/4] pxa_camera: Fix overrun condition on last buffer Robert Jarzmik
2009-03-16 11:25         ` Guennadi Liakhovetski
2009-03-16 19:37           ` Robert Jarzmik
2009-03-16 11:22       ` [PATCH v2 3/4] pxa_camera: Redesign DMA handling Guennadi Liakhovetski
2009-03-16 19:36         ` Robert Jarzmik [this message]
2009-03-16 20:42           ` Trent Piepho
2009-03-25  8:37           ` [PATCH] pxa-camera: simplify the .buf_queue path by merging two loops Guennadi Liakhovetski
2009-03-25 20:40             ` Robert Jarzmik
2009-03-16 10:50     ` [PATCH v2 2/4] pxa_camera: remove YUV planar formats hole Guennadi Liakhovetski
2009-03-16 19:37       ` Robert Jarzmik
2009-03-16  9:25   ` [PATCH v2 1/4] pxa_camera: Enforce YUV422P frame sizes to be 16 multiples Guennadi Liakhovetski
2009-03-16 18:26     ` Robert Jarzmik
2009-03-16 20:29       ` Trent Piepho
2009-03-16 20:47         ` Guennadi Liakhovetski

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=87hc1tdzv2.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.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;
as well as URLs for NNTP newsgroup(s).