diff options
author | Seema Khowala <seemaj@nvidia.com> | 2017-10-24 13:53:39 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-15 05:05:20 -0500 |
commit | ef6a296f5295932f02a5c500e85da7c8bd7ed84e (patch) | |
tree | 7dfeebaf42a283fdf8b7f01172e69231d6a7b1b6 /drivers/gpu | |
parent | 744d5a5212936fd453bacc46be52e6aeef076a69 (diff) |
gpu: nvgpu: get intr mask for an active_engine_id
This is needed for t19x during eng preempt done polling.
E.g. copy engine (CE) stall interrupt should not prevent GR
from finishing preemption. In order to check if current stall
interrupt is valid for the engine being polled for
preemption completion, function to provide engine
intr mask is needed. With this, polling code can make sure
there are no stall interrupts pending for the engine being
polled for preemption done. If stall interrupts
are pending for an engine, preemption will never finish.
Bug 200277163
Bug 1945121
Change-Id: Ie1ccac52c3e8d453a49084e195f2e7eaafb8f057
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1584065
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 424b1695..e65d3f00 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -463,6 +463,17 @@ int gk20a_fifo_init_engine_info(struct fifo_gk20a *f) | |||
463 | return 0; | 463 | return 0; |
464 | } | 464 | } |
465 | 465 | ||
466 | u32 gk20a_fifo_act_eng_interrupt_mask(struct gk20a *g, u32 act_eng_id) | ||
467 | { | ||
468 | struct fifo_engine_info_gk20a *engine_info = NULL; | ||
469 | |||
470 | engine_info = gk20a_fifo_get_engine_info(g, act_eng_id); | ||
471 | if (engine_info) | ||
472 | return engine_info->intr_mask; | ||
473 | |||
474 | return 0; | ||
475 | } | ||
476 | |||
466 | u32 gk20a_fifo_engine_interrupt_mask(struct gk20a *g) | 477 | u32 gk20a_fifo_engine_interrupt_mask(struct gk20a *g) |
467 | { | 478 | { |
468 | u32 eng_intr_mask = 0; | 479 | u32 eng_intr_mask = 0; |
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 4c967e80..42ad288f 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -276,6 +276,7 @@ void fifo_gk20a_finish_mmu_fault_handling(struct gk20a *g, | |||
276 | int gk20a_fifo_wait_engine_idle(struct gk20a *g); | 276 | int gk20a_fifo_wait_engine_idle(struct gk20a *g); |
277 | bool gk20a_fifo_is_engine_busy(struct gk20a *g); | 277 | bool gk20a_fifo_is_engine_busy(struct gk20a *g); |
278 | u32 gk20a_fifo_engine_interrupt_mask(struct gk20a *g); | 278 | u32 gk20a_fifo_engine_interrupt_mask(struct gk20a *g); |
279 | u32 gk20a_fifo_act_eng_interrupt_mask(struct gk20a *g, u32 act_eng_id); | ||
279 | u32 gk20a_fifo_get_pbdma_signature(struct gk20a *g); | 280 | u32 gk20a_fifo_get_pbdma_signature(struct gk20a *g); |
280 | u32 gk20a_fifo_get_failing_engine_data(struct gk20a *g, | 281 | u32 gk20a_fifo_get_failing_engine_data(struct gk20a *g, |
281 | int *__id, bool *__is_tsg); | 282 | int *__id, bool *__is_tsg); |