summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c6
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c11
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
3 files changed, 15 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
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index d1ad5992..cac62db7 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -154,6 +154,9 @@ int gk20a_finalize_poweron(struct gk20a *g)
154{ 154{
155 struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g)); 155 struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g));
156 int err; 156 int err;
157#if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_TEGRA_19x_GPU)
158 u32 nr_pages;
159#endif
157 160
158 gk20a_dbg_fn(""); 161 gk20a_dbg_fn("");
159 162
@@ -346,6 +349,14 @@ int gk20a_finalize_poweron(struct gk20a *g)
346 } 349 }
347 } 350 }
348 351
352#if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_TEGRA_19x_GPU)
353 if (gk20a_platform_has_syncpoints(g) && g->syncpt_unit_size) {
354 nr_pages = DIV_ROUND_UP(g->syncpt_unit_size, PAGE_SIZE);
355 __nvgpu_mem_create_from_phys(g, &g->syncpt_mem,
356 g->syncpt_unit_base, nr_pages);
357 }
358#endif
359
349done: 360done:
350 if (err) 361 if (err)
351 g->power_on = false; 362 g->power_on = false;
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 72e47ec6..a45a7b4e 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1293,6 +1293,7 @@ struct gk20a {
1293 size_t syncpt_unit_size; 1293 size_t syncpt_unit_size;
1294 u32 syncpt_size; 1294 u32 syncpt_size;
1295#endif 1295#endif
1296 struct nvgpu_mem syncpt_mem;
1296}; 1297};
1297 1298
1298static inline unsigned long gk20a_get_gr_idle_timeout(struct gk20a *g) 1299static inline unsigned long gk20a_get_gr_idle_timeout(struct gk20a *g)