diff options
author | Aparna Das <aparnad@nvidia.com> | 2018-02-15 16:55:47 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-06 17:52:52 -0500 |
commit | ca95adb2d4e51431de2f8fbe252bade55ba0ed46 (patch) | |
tree | 099c8b12d9408b27ce18556dd1d237585e6c19f9 /drivers/gpu/nvgpu/gk20a | |
parent | c6b846d34c1a3a92a856eed33c5a5175885a273a (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/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 2 |
3 files changed, 7 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 | ||
5270 | static int gk20a_gr_handle_semaphore_pending(struct gk20a *g, | 5270 | int 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); |
809 | u32 gk20a_init_sw_bundle(struct gk20a *g); | 809 | u32 gk20a_init_sw_bundle(struct gk20a *g); |
810 | int gr_gk20a_fecs_ctx_image_save(struct channel_gk20a *c, u32 save_type); | 810 | int gr_gk20a_fecs_ctx_image_save(struct channel_gk20a *c, u32 save_type); |
811 | int 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__*/ |