diff options
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c index 9b689699..e718a30d 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <gk20a/gk20a.h> | 23 | #include <gk20a/gk20a.h> |
24 | #include <nvgpu/dma.h> | ||
24 | #include <nvgpu/vgpu/vgpu.h> | 25 | #include <nvgpu/vgpu/vgpu.h> |
25 | #include <nvgpu/nvhost.h> | 26 | #include <nvgpu/nvhost.h> |
26 | #include <nvgpu/vgpu/tegra_vgpu.h> | 27 | #include <nvgpu/vgpu/tegra_vgpu.h> |
@@ -116,6 +117,14 @@ int vgpu_gv11b_fifo_alloc_syncpt_buf(struct channel_gk20a *c, | |||
116 | return 0; | 117 | return 0; |
117 | } | 118 | } |
118 | 119 | ||
120 | void vgpu_gv11b_fifo_free_syncpt_buf(struct channel_gk20a *c, | ||
121 | struct nvgpu_mem *syncpt_buf) | ||
122 | { | ||
123 | nvgpu_gmmu_unmap(c->vm, syncpt_buf, syncpt_buf->gpu_va); | ||
124 | __nvgpu_vm_free_va(c->vm, syncpt_buf->gpu_va, gmmu_page_size_kernel); | ||
125 | nvgpu_dma_free(c->g, syncpt_buf); | ||
126 | } | ||
127 | |||
119 | int vgpu_gv11b_fifo_get_sync_ro_map(struct vm_gk20a *vm, | 128 | int vgpu_gv11b_fifo_get_sync_ro_map(struct vm_gk20a *vm, |
120 | u64 *base_gpuva, u32 *sync_size) | 129 | u64 *base_gpuva, u32 *sync_size) |
121 | { | 130 | { |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.h b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.h index 6d8f8f60..9280c0ae 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.h +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.h | |||
@@ -28,6 +28,8 @@ struct gk20a; | |||
28 | int vgpu_gv11b_init_fifo_setup_hw(struct gk20a *g); | 28 | int vgpu_gv11b_init_fifo_setup_hw(struct gk20a *g); |
29 | int vgpu_gv11b_fifo_alloc_syncpt_buf(struct channel_gk20a *c, | 29 | int vgpu_gv11b_fifo_alloc_syncpt_buf(struct channel_gk20a *c, |
30 | u32 syncpt_id, struct nvgpu_mem *syncpt_buf); | 30 | u32 syncpt_id, struct nvgpu_mem *syncpt_buf); |
31 | void vgpu_gv11b_fifo_free_syncpt_buf(struct channel_gk20a *c, | ||
32 | struct nvgpu_mem *syncpt_buf); | ||
31 | int vgpu_gv11b_fifo_get_sync_ro_map(struct vm_gk20a *vm, | 33 | int vgpu_gv11b_fifo_get_sync_ro_map(struct vm_gk20a *vm, |
32 | u64 *base_gpuva, u32 *sync_size); | 34 | u64 *base_gpuva, u32 *sync_size); |
33 | #endif | 35 | #endif |
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c index e0142405..0a48e1ae 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -408,7 +408,7 @@ static const struct gpu_ops vgpu_gv11b_ops = { | |||
408 | .setup_sw = gk20a_init_fifo_setup_sw, | 408 | .setup_sw = gk20a_init_fifo_setup_sw, |
409 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 409 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
410 | .alloc_syncpt_buf = vgpu_gv11b_fifo_alloc_syncpt_buf, | 410 | .alloc_syncpt_buf = vgpu_gv11b_fifo_alloc_syncpt_buf, |
411 | .free_syncpt_buf = gv11b_fifo_free_syncpt_buf, | 411 | .free_syncpt_buf = vgpu_gv11b_fifo_free_syncpt_buf, |
412 | .add_syncpt_wait_cmd = gv11b_fifo_add_syncpt_wait_cmd, | 412 | .add_syncpt_wait_cmd = gv11b_fifo_add_syncpt_wait_cmd, |
413 | .get_syncpt_wait_cmd_size = gv11b_fifo_get_syncpt_wait_cmd_size, | 413 | .get_syncpt_wait_cmd_size = gv11b_fifo_get_syncpt_wait_cmd_size, |
414 | .get_syncpt_incr_per_release = | 414 | .get_syncpt_incr_per_release = |