public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <mike@compulab.co.il>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: video4linux-list@redhat.com
Subject: Re: pxa_camera: DMA alignment requirement
Date: Thu, 13 Nov 2008 12:23:43 +0200	[thread overview]
Message-ID: <491C002F.4070804@compulab.co.il> (raw)
In-Reply-To: <87prl4x28e.fsf@free.fr>



Robert Jarzmik wrote:
> Hello,
> 
> In the pxa camera driver, the 3 DMA channels used are MMU page aligned. Does
> somebody remember where that constraint comes from ?
> 
> I'm wondering because the planar YUV format generated is something like this for
> a 640 * 480 image :
>  - Y plane => 640 * 480 bytes = 307200 (and this happens to be a multiple of
>  pagesize : 307200 = 4096 * 75)
>  - U plane => 640 * 480 / 2 bytes = 153600 (and this is not a multiple of 4096)
>  - padding to reach next page : 2048 bytes
>  - V plane => 153600 bytes
>  - padding to reach next page : 2048 bytes
> 
> This means a user space library should be kernel pagesize aware to transform the
> output image. I don't really understand the necessity of page aligned DMA
> channels. Would someone tell me please ?

As far as I remember, the buffers should be page aligned to allow overlaying of
captured data.

> --
> Robert
> 
> --
> video4linux-list mailing list
> Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/video4linux-list
> 

-- 
Sincerely yours,
Mike.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  reply	other threads:[~2008-11-13 10:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-09 17:01 pxa_camera: DMA alignment requirement Robert Jarzmik
2008-11-13 10:23 ` Mike Rapoport [this message]
2008-11-16  1:14   ` Robert Jarzmik
2008-11-16  7:30     ` Mike Rapoport
2008-11-25 21:18       ` 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=491C002F.4070804@compulab.co.il \
    --to=mike@compulab.co.il \
    --cc=robert.jarzmik@free.fr \
    --cc=video4linux-list@redhat.com \
    /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