summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-11-29 18:34:19 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-12-01 20:07:18 -0500
commitfa2a3e2d3dd780d409e7673e7b47a34fd1cafb4f (patch)
tree3009a9dd1b274607d8ff121ebcc66cb1b0ddb89c
parent7ae3c070da0c8adc52a606129c8c5c37191add30 (diff)
gpu: nvgpu: Define create_from_phys when nvhost enabled
Define __nvgpu_mem_create_from_phys only in systems with nvhost enabled. The calling code is also built only when nvhost is enabled. phys_to_page() also exists only in arm64, so using it in non-arm64 platform causes a build failure. Change-Id: Iee023b55bba863d46079796e1c49c19456c1d229 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1607581 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/common/linux/nvgpu_mem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/nvgpu_mem.c b/drivers/gpu/nvgpu/common/linux/nvgpu_mem.c
index 2b3cb6fd..eb64ecd3 100644
--- a/drivers/gpu/nvgpu/common/linux/nvgpu_mem.c
+++ b/drivers/gpu/nvgpu/common/linux/nvgpu_mem.c
@@ -478,6 +478,7 @@ int __nvgpu_mem_create_from_pages(struct gk20a *g, struct nvgpu_mem *dest,
478 return 0; 478 return 0;
479} 479}
480 480
481#ifdef CONFIG_TEGRA_GK20A_NVHOST
481int __nvgpu_mem_create_from_phys(struct gk20a *g, struct nvgpu_mem *dest, 482int __nvgpu_mem_create_from_phys(struct gk20a *g, struct nvgpu_mem *dest,
482 u64 src_phys, int nr_pages) 483 u64 src_phys, int nr_pages)
483{ 484{
@@ -496,6 +497,7 @@ int __nvgpu_mem_create_from_phys(struct gk20a *g, struct nvgpu_mem *dest,
496 497
497 return ret; 498 return ret;
498} 499}
500#endif
499 501
500static void *nvgpu_mem_linux_sgl_next(void *sgl) 502static void *nvgpu_mem_linux_sgl_next(void *sgl)
501{ 503{