All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Michael Jones <michael.jones@matrix-vision.de>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: omap3isp buffer alignment
Date: Fri, 12 Aug 2011 11:28:21 +0200	[thread overview]
Message-ID: <201108121128.22850.laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20110811212145.GK5926@valkosipuli.localdomain>

On Thursday 11 August 2011 23:21:45 Sakari Ailus wrote:
> On Thu, Aug 11, 2011 at 11:57:04AM +0200, Michael Jones wrote:
> > Hi Laurent,
> > 
> > If I understood your discussion with Russell [1] correctly, user pointer
> > buffers are required to be page-aligned because of the IOMMU API, and
> > it's desirable to keep the IOMMU driver that way for other subsystems
> > which may use it. So we're stuck with user buffers needing to be
> > page-aligned.
> 
> My understanding is that this is actually a hardware requirement. You only
> can map pages of 4 kiB (at least).

The IOMMU works on a 4kiB page granularity, but that doesn't require buffers 
to be page-aligned. If the buffer start address isn't aligned on a page 
boundary the IOMMU can map the whole page, and the driver can then just add an 
offset to the virtual address.

> > There's a check in ispvideo.c:isp_video_buffer_prepare() that the buffer
> > address is 32-byte aligned. Isn't this superfluous considering the
> > page-aligned restriction?
> 
> I guess the ISP driver isn't assuming that ispmmu_vmap always give page
> aligned mappings --- or that the page size couls theoretically be smaller.
> The assumptions might not hold in another implementation of the IOMMU API,
> which however will be replaced (hopefully at some point) by the improved
> DMA mapping API.

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2011-08-12  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11  9:57 omap3isp buffer alignment Michael Jones
2011-08-11 21:21 ` Sakari Ailus
2011-08-12  9:28   ` Laurent Pinchart [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=201108121128.22850.laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=michael.jones@matrix-vision.de \
    --cc=sakari.ailus@iki.fi \
    /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.