diff options
author | Sourab Gupta <sourabg@nvidia.com> | 2018-04-17 00:19:01 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-19 19:43:59 -0400 |
commit | dea01d0acf80e69429adc31b6311d7f64c658440 (patch) | |
tree | ca0edbf6959d628154e3cafc448811a1a2ffcd40 /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |
parent | 86bb766e16858126cbb59f3c6347a203a6038b25 (diff) |
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>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index 5d428afa..ce06e78b 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Tegra GK20A GPU Debugger/Profiler Driver | 2 | * Tegra GK20A GPU Debugger/Profiler Driver |
3 | * | 3 | * |
4 | * Copyright (c) 2013-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -27,6 +27,7 @@ | |||
27 | #include <nvgpu/vm.h> | 27 | #include <nvgpu/vm.h> |
28 | #include <nvgpu/atomic.h> | 28 | #include <nvgpu/atomic.h> |
29 | #include <nvgpu/mm.h> | 29 | #include <nvgpu/mm.h> |
30 | #include <nvgpu/bug.h> | ||
30 | 31 | ||
31 | #include "gk20a.h" | 32 | #include "gk20a.h" |
32 | #include "gr_gk20a.h" | 33 | #include "gr_gk20a.h" |
@@ -106,7 +107,7 @@ void gk20a_dbg_gpu_post_events(struct channel_gk20a *ch) | |||
106 | 107 | ||
107 | dbg_s->dbg_events.num_pending_events++; | 108 | dbg_s->dbg_events.num_pending_events++; |
108 | 109 | ||
109 | nvgpu_cond_broadcast_interruptible(&dbg_s->dbg_events.wait_queue); | 110 | nvgpu_dbg_session_post_event(dbg_s); |
110 | } | 111 | } |
111 | } | 112 | } |
112 | 113 | ||