summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
authorAparna Das <aparnad@nvidia.com>2018-02-15 16:55:47 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-06 17:52:52 -0500
commitca95adb2d4e51431de2f8fbe252bade55ba0ed46 (patch)
tree099c8b12d9408b27ce18556dd1d237585e6c19f9 /drivers/gpu/nvgpu
parentc6b846d34c1a3a92a856eed33c5a5175885a273a (diff)
gpu: nvgpu: add hal op to handle semaphore pending
The vserver variant for gr handle semaphore pending needs different functionality to send interrupt to VM. Add HAL operation to allow overriding vserver usecase. Jira VQRM-2982 Change-Id: I5fee5a491c6e54344f9da477eaf5881c50335bbc Signed-off-by: Aparna Das <aparnad@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1658298 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h2
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c6
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h2
-rw-r--r--drivers/gpu/nvgpu/gm20b/hal_gm20b.c1
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c1
-rw-r--r--drivers/gpu/nvgpu/gp10b/hal_gp10b.c1
-rw-r--r--drivers/gpu/nvgpu/gv100/hal_gv100.c1
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c1
8 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 178c1200..6b93cb8d 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -447,6 +447,8 @@ struct gpu_ops {
447 struct gr_gk20a_isr_data *isr_data, u32 error_notifier); 447 struct gr_gk20a_isr_data *isr_data, u32 error_notifier);
448 int (*handle_notify_pending)(struct gk20a *g, 448 int (*handle_notify_pending)(struct gk20a *g,
449 struct gr_gk20a_isr_data *isr_data); 449 struct gr_gk20a_isr_data *isr_data);
450 int (*handle_semaphore_pending)(struct gk20a *g,
451 struct gr_gk20a_isr_data *isr_data);
450 } gr; 452 } gr;
451 struct { 453 struct {
452 void (*init_hw)(struct gk20a *g); 454 void (*init_hw)(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 068eb070..8b07619d 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -5267,8 +5267,8 @@ static int gk20a_gr_handle_firmware_method(struct gk20a *g,
5267 return -EINVAL; 5267 return -EINVAL;
5268} 5268}
5269 5269
5270static int gk20a_gr_handle_semaphore_pending(struct gk20a *g, 5270int gk20a_gr_handle_semaphore_pending(struct gk20a *g,
5271 struct gr_gk20a_isr_data *isr_data) 5271 struct gr_gk20a_isr_data *isr_data)
5272{ 5272{
5273 struct fifo_gk20a *f = &g->fifo; 5273 struct fifo_gk20a *f = &g->fifo;
5274 struct channel_gk20a *ch = &f->channel[isr_data->chid]; 5274 struct channel_gk20a *ch = &f->channel[isr_data->chid];
@@ -5896,7 +5896,7 @@ int gk20a_gr_isr(struct gk20a *g)
5896 } 5896 }
5897 5897
5898 if (gr_intr & gr_intr_semaphore_pending_f()) { 5898 if (gr_intr & gr_intr_semaphore_pending_f()) {
5899 gk20a_gr_handle_semaphore_pending(g, &isr_data); 5899 g->ops.gr.handle_semaphore_pending(g, &isr_data);
5900 gk20a_writel(g, gr_intr_r(), 5900 gk20a_writel(g, gr_intr_r(),
5901 gr_intr_semaphore_reset_f()); 5901 gr_intr_semaphore_reset_f());
5902 gr_intr &= ~gr_intr_semaphore_pending_f(); 5902 gr_intr &= ~gr_intr_semaphore_pending_f();
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index fff22f29..e4eb6c4a 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -808,4 +808,6 @@ int gr_gk20a_fecs_ctx_bind_channel(struct gk20a *g,
808 struct channel_gk20a *c); 808 struct channel_gk20a *c);
809u32 gk20a_init_sw_bundle(struct gk20a *g); 809u32 gk20a_init_sw_bundle(struct gk20a *g);
810int gr_gk20a_fecs_ctx_image_save(struct channel_gk20a *c, u32 save_type); 810int gr_gk20a_fecs_ctx_image_save(struct channel_gk20a *c, u32 save_type);
811int gk20a_gr_handle_semaphore_pending(struct gk20a *g,
812 struct gr_gk20a_isr_data *isr_data);
811#endif /*__GR_GK20A_H__*/ 813#endif /*__GR_GK20A_H__*/
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
index 9c3cc63e..ea087e92 100644
--- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
@@ -313,6 +313,7 @@ static const struct gpu_ops gm20b_ops = {
313 .fecs_host_int_enable = gr_gk20a_fecs_host_int_enable, 313 .fecs_host_int_enable = gr_gk20a_fecs_host_int_enable,
314 .set_error_notifier = gk20a_gr_set_error_notifier, 314 .set_error_notifier = gk20a_gr_set_error_notifier,
315 .handle_notify_pending = gk20a_gr_handle_notify_pending, 315 .handle_notify_pending = gk20a_gr_handle_notify_pending,
316 .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending,
316 }, 317 },
317 .fb = { 318 .fb = {
318 .reset = fb_gk20a_reset, 319 .reset = fb_gk20a_reset,
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index 75c9d336..e3d5556f 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -375,6 +375,7 @@ static const struct gpu_ops gp106_ops = {
375 .fecs_host_int_enable = gr_gk20a_fecs_host_int_enable, 375 .fecs_host_int_enable = gr_gk20a_fecs_host_int_enable,
376 .set_error_notifier = gk20a_gr_set_error_notifier, 376 .set_error_notifier = gk20a_gr_set_error_notifier,
377 .handle_notify_pending = gk20a_gr_handle_notify_pending, 377 .handle_notify_pending = gk20a_gr_handle_notify_pending,
378 .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending,
378 }, 379 },
379 .fb = { 380 .fb = {
380 .reset = gp106_fb_reset, 381 .reset = gp106_fb_reset,
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index 137980a9..dd914ed4 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -343,6 +343,7 @@ static const struct gpu_ops gp10b_ops = {
343 .fecs_host_int_enable = gr_gk20a_fecs_host_int_enable, 343 .fecs_host_int_enable = gr_gk20a_fecs_host_int_enable,
344 .set_error_notifier = gk20a_gr_set_error_notifier, 344 .set_error_notifier = gk20a_gr_set_error_notifier,
345 .handle_notify_pending = gk20a_gr_handle_notify_pending, 345 .handle_notify_pending = gk20a_gr_handle_notify_pending,
346 .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending,
346 }, 347 },
347 .fb = { 348 .fb = {
348 .reset = fb_gk20a_reset, 349 .reset = fb_gk20a_reset,
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c
index 7e1b6a3f..00f5bcce 100644
--- a/drivers/gpu/nvgpu/gv100/hal_gv100.c
+++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c
@@ -428,6 +428,7 @@ static const struct gpu_ops gv100_ops = {
428 .handle_ssync_hww = gr_gv11b_handle_ssync_hww, 428 .handle_ssync_hww = gr_gv11b_handle_ssync_hww,
429 .set_error_notifier = gk20a_gr_set_error_notifier, 429 .set_error_notifier = gk20a_gr_set_error_notifier,
430 .handle_notify_pending = gk20a_gr_handle_notify_pending, 430 .handle_notify_pending = gk20a_gr_handle_notify_pending,
431 .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending,
431 }, 432 },
432 .fb = { 433 .fb = {
433 .reset = gv100_fb_reset, 434 .reset = gv100_fb_reset,
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index 11d710bf..2443a4b1 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -395,6 +395,7 @@ static const struct gpu_ops gv11b_ops = {
395 .handle_ssync_hww = gr_gv11b_handle_ssync_hww, 395 .handle_ssync_hww = gr_gv11b_handle_ssync_hww,
396 .set_error_notifier = gk20a_gr_set_error_notifier, 396 .set_error_notifier = gk20a_gr_set_error_notifier,
397 .handle_notify_pending = gk20a_gr_handle_notify_pending, 397 .handle_notify_pending = gk20a_gr_handle_notify_pending,
398 .handle_semaphore_pending = gk20a_gr_handle_semaphore_pending,
398 }, 399 },
399 .fb = { 400 .fb = {
400 .reset = gv11b_fb_reset, 401 .reset = gv11b_fb_reset,