summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-14 16:19:04 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-18 18:14:31 -0400
commitb7fca01b0e01544c3a66d2e05a8b99bcb621a004 (patch)
treed83d23a5f2ed2ad0ea30caa2b489b4bd0039b790 /drivers/gpu/nvgpu/gk20a/mm_gk20a.c
parentb1d303685b384d58064d8b18ec97e1302bcbba88 (diff)
gpu: nvgpu: Scrub gk20a_platform dependencies
Remove gk20a_platform dependencies from gk20a.h. This makes gk20a_platform a Linux platform specific data structure. Add #include for platform_gk20a.h in the source files that still depend on Linux. JIRA NVGPU-16 Change-Id: Ib098accd34a1f5066eb8680c387f9b178169f3f0 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1463547 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 4d904761..201c2090 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -41,6 +41,7 @@
41#include <nvgpu/linux/dma.h> 41#include <nvgpu/linux/dma.h>
42 42
43#include "gk20a.h" 43#include "gk20a.h"
44#include "platform_gk20a.h"
44#include "mm_gk20a.h" 45#include "mm_gk20a.h"
45#include "fence_gk20a.h" 46#include "fence_gk20a.h"
46#include "kind_gk20a.h" 47#include "kind_gk20a.h"
@@ -1262,16 +1263,16 @@ u64 gk20a_vm_alloc_va(struct vm_gk20a *vm,
1262 struct nvgpu_allocator *vma = vm->vma[gmmu_pgsz_idx]; 1263 struct nvgpu_allocator *vma = vm->vma[gmmu_pgsz_idx];
1263 u64 offset; 1264 u64 offset;
1264 u64 gmmu_page_size = vm->gmmu_page_sizes[gmmu_pgsz_idx]; 1265 u64 gmmu_page_size = vm->gmmu_page_sizes[gmmu_pgsz_idx];
1266 struct gk20a *g = vm->mm->g;
1265 1267
1266 if (gmmu_pgsz_idx >= gmmu_nr_page_sizes) { 1268 if (gmmu_pgsz_idx >= gmmu_nr_page_sizes) {
1267 dev_warn(dev_from_vm(vm), 1269 nvgpu_warn(g,
1268 "invalid page size requested in gk20a vm alloc"); 1270 "invalid page size requested in gk20a vm alloc");
1269 return 0; 1271 return 0;
1270 } 1272 }
1271 1273
1272 if ((gmmu_pgsz_idx == gmmu_page_size_big) && !vm->big_pages) { 1274 if ((gmmu_pgsz_idx == gmmu_page_size_big) && !vm->big_pages) {
1273 dev_warn(dev_from_vm(vm), 1275 nvgpu_warn(g, "unsupportd page size requested");
1274 "unsupportd page size requested");
1275 return 0; 1276 return 0;
1276 1277
1277 } 1278 }