summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-06-27 19:33:19 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-02 13:20:14 -0400
commiteabf3541ea8dc91689240e3ba367487fa880b5e0 (patch)
tree0add0449b859ce5915746c601b745847354e7241 /drivers
parent843d3784c410c724020cc4daaf249627ea92bcfd (diff)
gpu: nvgpu: add ops to support t19x ce changes
JIRA GPUT19X-46 Change-Id: Idd17f2f644da1bbb8d31a55ac91561b25ff68aac Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master/r/1509749 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h5
-rw-r--r--drivers/gpu/nvgpu/gk20a/tsg_gk20a.c7
-rw-r--r--drivers/gpu/nvgpu/gk20a/tsg_gk20a.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 1e6995c4..61832320 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -155,6 +155,7 @@ struct gpu_ops {
155 struct { 155 struct {
156 void (*isr_stall)(struct gk20a *g, u32 inst_id, u32 pri_base); 156 void (*isr_stall)(struct gk20a *g, u32 inst_id, u32 pri_base);
157 int (*isr_nonstall)(struct gk20a *g, u32 inst_id, u32 pri_base); 157 int (*isr_nonstall)(struct gk20a *g, u32 inst_id, u32 pri_base);
158 u32 (*get_num_pce)(struct gk20a *g);
158 } ce2; 159 } ce2;
159 struct { 160 struct {
160 int (*init_fs_state)(struct gk20a *g); 161 int (*init_fs_state)(struct gk20a *g);
@@ -499,6 +500,10 @@ struct gpu_ops {
499 unsigned int (*handle_pbdma_intr_1)(struct gk20a *g, 500 unsigned int (*handle_pbdma_intr_1)(struct gk20a *g,
500 u32 pbdma_id, u32 pbdma_intr_1, 501 u32 pbdma_id, u32 pbdma_intr_1,
501 u32 *handled, u32 *error_notifier); 502 u32 *handled, u32 *error_notifier);
503 void (*init_eng_method_buffers)(struct gk20a *g,
504 struct tsg_gk20a *tsg);
505 void (*deinit_eng_method_buffers)(struct gk20a *g,
506 struct tsg_gk20a *tsg);
502#ifdef CONFIG_TEGRA_GK20A_NVHOST 507#ifdef CONFIG_TEGRA_GK20A_NVHOST
503 int (*alloc_syncpt_buf)(struct channel_gk20a *c, 508 int (*alloc_syncpt_buf)(struct channel_gk20a *c,
504 u32 syncpt_id, struct nvgpu_mem *syncpt_buf); 509 u32 syncpt_id, struct nvgpu_mem *syncpt_buf);
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
index 0d07c790..a0dcd622 100644
--- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
@@ -268,6 +268,9 @@ struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g)
268 tsg->runlist_id = ~0; 268 tsg->runlist_id = ~0;
269 tsg->tgid = current->tgid; 269 tsg->tgid = current->tgid;
270 270
271 if (g->ops.fifo.init_eng_method_buffers)
272 g->ops.fifo.init_eng_method_buffers(g, tsg);
273
271 if (g->ops.fifo.tsg_open) { 274 if (g->ops.fifo.tsg_open) {
272 err = g->ops.fifo.tsg_open(tsg); 275 err = g->ops.fifo.tsg_open(tsg);
273 if (err) { 276 if (err) {
@@ -298,6 +301,10 @@ void gk20a_tsg_release(struct kref *ref)
298 gr_gk20a_free_tsg_gr_ctx(tsg); 301 gr_gk20a_free_tsg_gr_ctx(tsg);
299 tsg->tsg_gr_ctx = NULL; 302 tsg->tsg_gr_ctx = NULL;
300 } 303 }
304
305 if (g->ops.fifo.deinit_eng_method_buffers)
306 g->ops.fifo.deinit_eng_method_buffers(g, tsg);
307
301 if (tsg->vm) { 308 if (tsg->vm) {
302 nvgpu_vm_put(tsg->vm); 309 nvgpu_vm_put(tsg->vm);
303 tsg->vm = NULL; 310 tsg->vm = NULL;
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h
index 72cff4f9..e6a4a3cc 100644
--- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h
@@ -59,6 +59,7 @@ struct tsg_gk20a {
59 59
60 u32 runlist_id; 60 u32 runlist_id;
61 pid_t tgid; 61 pid_t tgid;
62 struct nvgpu_mem *eng_method_buffers;
62}; 63};
63 64
64int gk20a_enable_tsg(struct tsg_gk20a *tsg); 65int gk20a_enable_tsg(struct tsg_gk20a *tsg);