Messages in this thread | | | From | Tomasz Figa <> | Date | Fri, 26 Jul 2019 00:41:48 +0900 | Subject | Re: [PATCH v2 1/7] media: hantro: Set DMA max segment size |
| |
On Fri, Jul 26, 2019 at 12:36 AM Philipp Zabel <p.zabel@pengutronix.de> wrote: > > On Thu, 2019-07-25 at 11:17 -0300, Ezequiel Garcia wrote: > > From: Francois Buergisser <fbuergisser@chromium.org> > > > > The Hantro codec is typically used in platforms with an IOMMU, > > so we need to set a proper DMA segment size. > > ... to make sure the DMA-mapping subsystem produces contiguous mappings? > > > Devices without an > > IOMMU will still fallback to default 64KiB segments. > > I don't understand this comment. The default max_seg_size may be 64 KiB, > but if we are always setting it to DMA_BUT_MASK(32), there is no falling > back. >
DMA mask and segment size are two completely orthogonal parameters. Please check https://elixir.bootlin.com/linux/v5.3-rc1/source/drivers/iommu/dma-iommu.c#L740 for an example of how the latter is used.
Best regards, Tomasz
| |