mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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 <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1656753 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>
This commit is contained in:
committed by
mobile promotions
parent
f6cac2e0c4
commit
c6b846d34c
@@ -15,6 +15,7 @@
|
||||
#include <linux/irqreturn.h>
|
||||
|
||||
#include "gk20a/gk20a.h"
|
||||
#include "gk20a/mc_gk20a.h"
|
||||
|
||||
#include <nvgpu/atomic.h>
|
||||
#include <nvgpu/unit.h>
|
||||
@@ -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 {
|
||||
u32 ops;
|
||||
|
||||
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);
|
||||
|
||||
mc_gk20a_handle_intr_nonstall(g, ops);
|
||||
} while (atomic_read(&l->nonstall_ops) != 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user