summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
authorShashank Singh <shashsingh@nvidia.com>2017-12-28 01:22:14 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-12 12:13:00 -0400
commitdb089a73a586b34e6266504925b29eea8628673e (patch)
tree6006c525d7046a75974f26ad65f0f4cfee3da768 /drivers/gpu/nvgpu/gk20a/gk20a.h
parent02956adcd35507dde5db3a3b006a5c6a06334733 (diff)
gpu: nvgpu: add refcounting for ctxsw disable/enable
ctxsw disable could be called recursively for RM server. Suspend contexts disables ctxsw at the beginning, then call tsg disable and preempt. If preempt timeout happens, it goes to recovery path, which will try to disable ctxsw again. More details on Bug 200331110. Jira VQRM-2982 Change-Id: I4659c842ae73ed59be51ae65b25366f24abcaf22 Signed-off-by: Shashank Singh <shashsingh@nvidia.com> Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1671716 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sourab Gupta <sourabg@nvidia.com> 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/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 3442861c..4ebdb6a4 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1191,6 +1191,9 @@ struct gk20a {
1191 1191
1192 nvgpu_atomic_t usage_count; 1192 nvgpu_atomic_t usage_count;
1193 1193
1194 struct nvgpu_mutex ctxsw_disable_lock;
1195 int ctxsw_disable_count;
1196
1194 struct nvgpu_ref refcount; 1197 struct nvgpu_ref refcount;
1195 1198
1196 const char *name; 1199 const char *name;