From c6b846d34c1a3a92a856eed33c5a5175885a273a Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Thu, 1 Mar 2018 14:47:35 -0800 Subject: gpu: nvgpu: add gops.semaphore_wakeup HAL vserver handles semaphore differently from native, so it needs a callback to differentiate from native. Also created common function mc_gk20a_handle_intr_nonstall to handle all nonstall interrupts. Jira VQRM-2982 Change-Id: I1b3821717a4005ca4bf2a4dac5dcd335872f48f1 Signed-off-by: Richard Zhao Reviewed-on: https://git-master.nvidia.com/r/1656753 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/intr.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux') diff --git a/drivers/gpu/nvgpu/common/linux/intr.c b/drivers/gpu/nvgpu/common/linux/intr.c index d1b6ef36..6b4b2dc9 100644 --- a/drivers/gpu/nvgpu/common/linux/intr.c +++ b/drivers/gpu/nvgpu/common/linux/intr.c @@ -15,6 +15,7 @@ #include #include "gk20a/gk20a.h" +#include "gk20a/mc_gk20a.h" #include #include @@ -138,17 +139,11 @@ void nvgpu_intr_nonstall_cb(struct work_struct *work) struct nvgpu_os_linux *l = container_of(work, struct nvgpu_os_linux, nonstall_fn_work); struct gk20a *g = &l->g; - u32 ops; - bool semaphore_wakeup, post_events; do { - ops = atomic_xchg(&l->nonstall_ops, 0); - - semaphore_wakeup = ops & gk20a_nonstall_ops_wakeup_semaphore; - post_events = ops & gk20a_nonstall_ops_post_events; - - if (semaphore_wakeup) - gk20a_channel_semaphore_wakeup(g, post_events); + u32 ops; + ops = atomic_xchg(&l->nonstall_ops, 0); + mc_gk20a_handle_intr_nonstall(g, ops); } while (atomic_read(&l->nonstall_ops) != 0); } -- cgit v1.2.2