summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/cde_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/cde_gk20a.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
index d5d75be5..cf95019b 100644
--- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
@@ -46,6 +46,12 @@
46#include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h> 46#include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h>
47#include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h> 47#include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h>
48 48
49/*
50 * Currently this code uses nvgpu_vm_map() since it takes dmabuf FDs from the
51 * CDE ioctls. That has to change - instead this needs to take an nvgpu_mem.
52 */
53#include "common/linux/vm_priv.h"
54
49static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx); 55static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx);
50static struct gk20a_cde_ctx *gk20a_cde_allocate_context(struct gk20a *g); 56static struct gk20a_cde_ctx *gk20a_cde_allocate_context(struct gk20a *g);
51 57
@@ -1016,8 +1022,8 @@ __releases(&cde_app->mutex)
1016 1022
1017 1023
1018 /* map the destination buffer */ 1024 /* map the destination buffer */
1019 get_dma_buf(compbits_scatter_buf); /* a ref for gk20a_vm_map */ 1025 get_dma_buf(compbits_scatter_buf); /* a ref for nvgpu_vm_map */
1020 map_vaddr = gk20a_vm_map(cde_ctx->vm, compbits_scatter_buf, 0, 1026 map_vaddr = nvgpu_vm_map(cde_ctx->vm, compbits_scatter_buf, 0,
1021 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE, 1027 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE,
1022 compbits_kind, NULL, true, 1028 compbits_kind, NULL, true,
1023 gk20a_mem_flag_none, 1029 gk20a_mem_flag_none,
@@ -1136,7 +1142,7 @@ __releases(&cde_app->mutex)
1136 cde_ctx->init_cmd_executed = true; 1142 cde_ctx->init_cmd_executed = true;
1137 1143
1138 /* unmap the buffers - channel holds references to them now */ 1144 /* unmap the buffers - channel holds references to them now */
1139 gk20a_vm_unmap(cde_ctx->vm, map_vaddr); 1145 nvgpu_vm_unmap(cde_ctx->vm, map_vaddr);
1140 1146
1141 return err; 1147 return err;
1142 1148
@@ -1144,7 +1150,7 @@ exit_unmap_surface:
1144 if (surface) 1150 if (surface)
1145 dma_buf_vunmap(compbits_scatter_buf, surface); 1151 dma_buf_vunmap(compbits_scatter_buf, surface);
1146exit_unmap_vaddr: 1152exit_unmap_vaddr:
1147 gk20a_vm_unmap(cde_ctx->vm, map_vaddr); 1153 nvgpu_vm_unmap(cde_ctx->vm, map_vaddr);
1148exit_idle: 1154exit_idle:
1149 gk20a_idle(g); 1155 gk20a_idle(g);
1150 return err; 1156 return err;
@@ -1277,7 +1283,7 @@ err_init_cde_img:
1277 nvgpu_gmmu_unmap(ch->vm, &g->gr.compbit_store.mem, vaddr); 1283 nvgpu_gmmu_unmap(ch->vm, &g->gr.compbit_store.mem, vaddr);
1278err_map_backingstore: 1284err_map_backingstore:
1279err_alloc_gpfifo: 1285err_alloc_gpfifo:
1280 gk20a_vm_put(ch->vm); 1286 nvgpu_vm_put(ch->vm);
1281err_commit_va: 1287err_commit_va:
1282err_get_gk20a_channel: 1288err_get_gk20a_channel:
1283 nvgpu_release_firmware(g, img); 1289 nvgpu_release_firmware(g, img);