summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2017-07-06 01:47:20 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-13 18:19:16 -0400
commita9ce91f910ca730a3abadb9e7491e3504af30d86 (patch)
treed79e70c782672e6d6281db57a1053e515ee7914a /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
parent017a9f57756f120cb492fc6c66d8588a2c1626d8 (diff)
gpu: nvgpu: add syncpoint read map
For sync-point read map: 1. Added nvgpu_mem memory allocator in gk20a struct and allocated memory for this in gk20a_finalize_poweron() and freed this memory in gk20a_remove(). 2. Added "u64 syncpt_ro_map_gpu_va" in vm_gk20a struct for read map in vm. Added nvgpu_quiesce() in nvgpu_remove() before freeing syncpoint read map to ensure that nvgpu is idle. JIRA GPUT19X-2 Change-Id: I7cbfec57f0992682dd833a1b0d92d694bcaf1eb3 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1514338 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
index 380ea048..d83684e4 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
@@ -76,9 +76,9 @@ static int gk20a_channel_syncpt_wait_syncpt(struct gk20a_channel_sync *s,
76 } 76 }
77 77
78 nvgpu_log(c->g, gpu_dbg_info, "sp->id %d gpu va %llx", 78 nvgpu_log(c->g, gpu_dbg_info, "sp->id %d gpu va %llx",
79 id, sp->syncpt_buf.gpu_va); 79 id, sp->c->vm->syncpt_ro_map_gpu_va);
80 c->g->ops.fifo.add_syncpt_wait_cmd(c->g, wait_cmd, 0, id, 80 c->g->ops.fifo.add_syncpt_wait_cmd(c->g, wait_cmd, 0, id,
81 thresh, sp->syncpt_buf.gpu_va); 81 thresh, c->vm->syncpt_ro_map_gpu_va);
82 82
83 return 0; 83 return 0;
84} 84}
@@ -147,7 +147,7 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd,
147 wait_id, sp->syncpt_buf.gpu_va); 147 wait_id, sp->syncpt_buf.gpu_va);
148 c->g->ops.fifo.add_syncpt_wait_cmd(c->g, wait_cmd, 148 c->g->ops.fifo.add_syncpt_wait_cmd(c->g, wait_cmd,
149 i * wait_cmd_size, wait_id, wait_value, 149 i * wait_cmd_size, wait_id, wait_value,
150 sp->syncpt_buf.gpu_va); 150 c->vm->syncpt_ro_map_gpu_va);
151 } 151 }
152 } 152 }
153 153