diff options
author | Aparna Das <aparnad@nvidia.com> | 2018-02-15 15:42:08 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-06 17:52:12 -0500 |
commit | d654ab48638b0160ccef6f7be0faa8b3b3ee1fab (patch) | |
tree | bc1cef7dbf28d2221cb749abb280b5753221f690 | |
parent | d6c6c6c483478654b34685b9e13ed160bad49a1c (diff) |
gpu: nvgpu: add hal op to handle notify pending
The vserver variant for gr handle notify pending needs different
functionality to send interrupt to VM. Add HAL operation to allow
overriding vserver usecase.
Jira VQRM-2982
Change-Id: I4cb88d4d769a5d5cb98a4ee6ac3fbb74245cb5f2
Signed-off-by: Aparna Das <aparnad@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1658255
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 1 |
8 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 84392025..d9e3c97d 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -445,6 +445,8 @@ struct gpu_ops { | |||
445 | int (*handle_ssync_hww)(struct gk20a *g); | 445 | int (*handle_ssync_hww)(struct gk20a *g); |
446 | void (*set_error_notifier)(struct gk20a *g, | 446 | void (*set_error_notifier)(struct gk20a *g, |
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, | ||
449 | struct gr_gk20a_isr_data *isr_data); | ||
448 | } gr; | 450 | } gr; |
449 | struct { | 451 | struct { |
450 | void (*init_hw)(struct gk20a *g); | 452 | 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 b37ae8cd..8f263e67 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -5302,7 +5302,7 @@ static inline bool is_valid_cyclestats_bar0_offset_gk20a(struct gk20a *g, | |||
5302 | } | 5302 | } |
5303 | #endif | 5303 | #endif |
5304 | 5304 | ||
5305 | static int gk20a_gr_handle_notify_pending(struct gk20a *g, | 5305 | int gk20a_gr_handle_notify_pending(struct gk20a *g, |
5306 | struct gr_gk20a_isr_data *isr_data) | 5306 | struct gr_gk20a_isr_data *isr_data) |
5307 | { | 5307 | { |
5308 | struct fifo_gk20a *f = &g->fifo; | 5308 | struct fifo_gk20a *f = &g->fifo; |
@@ -5891,7 +5891,7 @@ int gk20a_gr_isr(struct gk20a *g) | |||
5891 | isr_data.sub_chan, isr_data.class_num); | 5891 | isr_data.sub_chan, isr_data.class_num); |
5892 | 5892 | ||
5893 | if (gr_intr & gr_intr_notify_pending_f()) { | 5893 | if (gr_intr & gr_intr_notify_pending_f()) { |
5894 | gk20a_gr_handle_notify_pending(g, &isr_data); | 5894 | g->ops.gr.handle_notify_pending(g, &isr_data); |
5895 | gk20a_writel(g, gr_intr_r(), | 5895 | gk20a_writel(g, gr_intr_r(), |
5896 | gr_intr_notify_reset_f()); | 5896 | gr_intr_notify_reset_f()); |
5897 | gr_intr &= ~gr_intr_notify_pending_f(); | 5897 | gr_intr &= ~gr_intr_notify_pending_f(); |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index d1ba6353..1bf58f5c 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |||
@@ -800,4 +800,6 @@ void gk20a_gr_init_ctxsw_hdr_data(struct gk20a *g, | |||
800 | u32 gr_gk20a_get_patch_slots(struct gk20a *g); | 800 | u32 gr_gk20a_get_patch_slots(struct gk20a *g); |
801 | void gk20a_gr_set_error_notifier(struct gk20a *g, | 801 | void gk20a_gr_set_error_notifier(struct gk20a *g, |
802 | struct gr_gk20a_isr_data *isr_data, u32 error_notifier); | 802 | struct gr_gk20a_isr_data *isr_data, u32 error_notifier); |
803 | int gk20a_gr_handle_notify_pending(struct gk20a *g, | ||
804 | struct gr_gk20a_isr_data *isr_data); | ||
803 | #endif /*__GR_GK20A_H__*/ | 805 | #endif /*__GR_GK20A_H__*/ |
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 7425dc37..2d53a926 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -312,6 +312,7 @@ static const struct gpu_ops gm20b_ops = { | |||
312 | .init_ctxsw_hdr_data = gk20a_gr_init_ctxsw_hdr_data, | 312 | .init_ctxsw_hdr_data = gk20a_gr_init_ctxsw_hdr_data, |
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 | }, | 316 | }, |
316 | .fb = { | 317 | .fb = { |
317 | .reset = fb_gk20a_reset, | 318 | .reset = fb_gk20a_reset, |
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 2fa8359e..a0068a6f 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -374,6 +374,7 @@ static const struct gpu_ops gp106_ops = { | |||
374 | .load_ctxsw_ucode = gr_gm20b_load_ctxsw_ucode, | 374 | .load_ctxsw_ucode = gr_gm20b_load_ctxsw_ucode, |
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 | }, | 378 | }, |
378 | .fb = { | 379 | .fb = { |
379 | .reset = gp106_fb_reset, | 380 | .reset = gp106_fb_reset, |
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 38facd97..65fdf714 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -342,6 +342,7 @@ static const struct gpu_ops gp10b_ops = { | |||
342 | .dump_ctxsw_stats = gr_gp10b_dump_ctxsw_stats, | 342 | .dump_ctxsw_stats = gr_gp10b_dump_ctxsw_stats, |
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 | }, | 346 | }, |
346 | .fb = { | 347 | .fb = { |
347 | .reset = fb_gk20a_reset, | 348 | .reset = fb_gk20a_reset, |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 449c3f9c..6598d7f6 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -427,6 +427,7 @@ static const struct gpu_ops gv100_ops = { | |||
427 | .fecs_host_int_enable = gr_gv11b_fecs_host_int_enable, | 427 | .fecs_host_int_enable = gr_gv11b_fecs_host_int_enable, |
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 | }, | 431 | }, |
431 | .fb = { | 432 | .fb = { |
432 | .reset = gv100_fb_reset, | 433 | .reset = gv100_fb_reset, |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 7ae8898b..700dc7fc 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -394,6 +394,7 @@ static const struct gpu_ops gv11b_ops = { | |||
394 | .fecs_host_int_enable = gr_gv11b_fecs_host_int_enable, | 394 | .fecs_host_int_enable = gr_gv11b_fecs_host_int_enable, |
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 | }, | 398 | }, |
398 | .fb = { | 399 | .fb = { |
399 | .reset = gv11b_fb_reset, | 400 | .reset = gv11b_fb_reset, |