From a9ce91f910ca730a3abadb9e7491e3504af30d86 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Wed, 5 Jul 2017 22:47:20 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1514338 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c') 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, } nvgpu_log(c->g, gpu_dbg_info, "sp->id %d gpu va %llx", - id, sp->syncpt_buf.gpu_va); + id, sp->c->vm->syncpt_ro_map_gpu_va); c->g->ops.fifo.add_syncpt_wait_cmd(c->g, wait_cmd, 0, id, - thresh, sp->syncpt_buf.gpu_va); + thresh, c->vm->syncpt_ro_map_gpu_va); return 0; } @@ -147,7 +147,7 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd, wait_id, sp->syncpt_buf.gpu_va); c->g->ops.fifo.add_syncpt_wait_cmd(c->g, wait_cmd, i * wait_cmd_size, wait_id, wait_value, - sp->syncpt_buf.gpu_va); + c->vm->syncpt_ro_map_gpu_va); } } -- cgit v1.2.2