Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340816

Re: [PATCH 2/2] drm/tegra: Set the DMA mask

From Thierry Reding <thierry.reding@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] drm/tegra: Set the DMA mask
Date 2016-02-23 17:10 +0100
Message-ID <r5nHc-7N8-21@gated-at.bofh.it> (permalink)
References <r5eDU-1jC-5@gated-at.bofh.it> <r5eDU-1jC-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Feb 23, 2016 at 03:25:54PM +0900, Alexandre Courbot wrote:
> The default DMA mask covers a 32 bits address range, but tegradrm can
> address more than that. Set the DMA mask to the actual addressable range
> to avoid the use of unneeded bounce buffers.
> 
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
> Thierry, I am not absolutely sure whether the size is correct and applies
> to all Tegra generations - please let me know if this needs to be
> reworked.
> 
>  drivers/gpu/drm/tegra/drm.c | 1 +
>  1 file changed, 1 insertion(+)

This kind of depends on whether or not the device is behind an IOMMU. If
it is, then the IOMMU DMA MASK would apply, which can be derived from
the number of address bits that the IOMMU can handle. The SMMU supports
32 address bits on Tegra30 and Tegra114, 34 address bits on more recent
generations.

I think for now it's safer to leave the DMA mask at the default (32 bit)
to avoid the need to distinguish between IOMMU and non-IOMMU devices.

Thierry

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] drm/tegra: Set the DMA mask Alexandre Courbot <acourbot@nvidia.com> - 2016-02-23 07:30 +0100
  Re: [PATCH 2/2] drm/tegra: Set the DMA mask Thierry Reding <thierry.reding@gmail.com> - 2016-02-23 17:10 +0100
    Re: [PATCH 2/2] drm/tegra: Set the DMA mask Terje Bergstrom <tbergstrom@nvidia.com> - 2016-02-23 17:20 +0100
      Re: [PATCH 2/2] drm/tegra: Set the DMA mask Thierry Reding <thierry.reding@gmail.com> - 2016-02-23 17:30 +0100
    Re: [PATCH 2/2] drm/tegra: Set the DMA mask Alexandre Courbot <acourbot@nvidia.com> - 2016-02-24 09:40 +0100

csiph-web