mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: post dbg session event from os specific code
As part of debug session unification following changes are required. -Including bug.h header file to fix the compilation issue on QNX - The mechanism of posting debug events is OS specific. In Linux this works through poll fd, wherein we can make use of nvgpu_cond variables to poll and trigger the corresponding wait_queue via nvgpu_cond_broadcast_interruptible() call. The post event functionality on QNX doesn't work on poll though. It uses iofunc_notify_trigger to post the debug events to calling process. As such QNX can't work with nvgpu_cond's. To overcome this issue, it is proposed to create a OS specific interface for posting debugger events. Linux can call nvgpu_cond_broadcast_interruptible() in its implementation, which makes sense since these are already initialized and poll'ed in the Linux specific code only. QNX can implement this interface to call iofunc_notify_* functions, as per its need Jira VQRM-2363 Change-Id: I0abdc0787f771040b8aff5384290d7e6549f81fb Signed-off-by: Sourab Gupta <sourabg@nvidia.com> Signed-off-by: Prateek Sethi <prsethi@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1696368 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Richard Zhao <rizhao@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
86bb766e16
commit
dea01d0acf
@@ -468,6 +468,11 @@ free_ref:
|
||||
return err;
|
||||
}
|
||||
|
||||
void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s)
|
||||
{
|
||||
nvgpu_cond_broadcast_interruptible(&dbg_s->dbg_events.wait_queue);
|
||||
}
|
||||
|
||||
static int dbg_unbind_single_channel_gk20a(struct dbg_session_gk20a *dbg_s,
|
||||
struct dbg_session_channel_data *ch_data)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Tegra GK20A GPU Debugger/Profiler Driver
|
||||
*
|
||||
* Copyright (c) 2013-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <nvgpu/vm.h>
|
||||
#include <nvgpu/atomic.h>
|
||||
#include <nvgpu/mm.h>
|
||||
#include <nvgpu/bug.h>
|
||||
|
||||
#include "gk20a.h"
|
||||
#include "gr_gk20a.h"
|
||||
@@ -106,7 +107,7 @@ void gk20a_dbg_gpu_post_events(struct channel_gk20a *ch)
|
||||
|
||||
dbg_s->dbg_events.num_pending_events++;
|
||||
|
||||
nvgpu_cond_broadcast_interruptible(&dbg_s->dbg_events.wait_queue);
|
||||
nvgpu_dbg_session_post_event(dbg_s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Tegra GK20A GPU Debugger Driver
|
||||
*
|
||||
* Copyright (c) 2013-2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -132,4 +132,5 @@ void nvgpu_release_profiler_reservation(struct dbg_session_gk20a *dbg_s,
|
||||
int gk20a_perfbuf_enable_locked(struct gk20a *g, u64 offset, u32 size);
|
||||
int gk20a_perfbuf_disable_locked(struct gk20a *g);
|
||||
|
||||
void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s);
|
||||
#endif /* DBG_GPU_GK20A_H */
|
||||
|
||||
Reference in New Issue
Block a user