diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-11-29 18:32:59 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-12-11 11:31:40 -0500 |
commit | ba69628aafefcf4567f2f3b1459ccc4ebd8e203f (patch) | |
tree | 78f0b21e68d009046571f47136635cca3e9aade1 /drivers/gpu/nvgpu/common/linux/nvgpu_mem.c | |
parent | 796c1a9ac892c6cf563f55608e3b66f753228847 (diff) |
gpu: nvgpu: Use device_is_iommuable() only for iGPU
device_is_iommuable() is defined only in Tegra kernel. There is no
explicit config option to check for its existance, so skip building
that code when Tegra iGPU is not supported.
Change-Id: I50dc47070fa416181d458beabf5a2f2373931331
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1612649
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/nvgpu_mem.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/nvgpu_mem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/nvgpu_mem.c b/drivers/gpu/nvgpu/common/linux/nvgpu_mem.c index eb64ecd3..79098eca 100644 --- a/drivers/gpu/nvgpu/common/linux/nvgpu_mem.c +++ b/drivers/gpu/nvgpu/common/linux/nvgpu_mem.c | |||
@@ -313,9 +313,7 @@ void nvgpu_memset(struct gk20a *g, struct nvgpu_mem *mem, u32 offset, | |||
313 | */ | 313 | */ |
314 | u64 nvgpu_mem_get_addr_sgl(struct gk20a *g, struct scatterlist *sgl) | 314 | u64 nvgpu_mem_get_addr_sgl(struct gk20a *g, struct scatterlist *sgl) |
315 | { | 315 | { |
316 | struct nvgpu_os_linux *l = container_of(g, struct nvgpu_os_linux, g); | 316 | if (!nvgpu_iommuable(g)) |
317 | |||
318 | if (!device_is_iommuable(l->dev)) | ||
319 | return g->ops.mm.gpu_phys_addr(g, NULL, sg_phys(sgl)); | 317 | return g->ops.mm.gpu_phys_addr(g, NULL, sg_phys(sgl)); |
320 | 318 | ||
321 | if (sg_dma_address(sgl) == 0) | 319 | if (sg_dma_address(sgl) == 0) |