diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2017-08-08 02:38:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-24 04:10:37 -0400 |
commit | 3fa47b877db1edc16018d662e7b9915d92354745 (patch) | |
tree | c1d9a8734e7d92b5ae647fbc3f582a01207a23f6 /drivers/gpu/nvgpu/gk20a/tsg_gk20a.h | |
parent | 8662fae334f2419da2e7fd220f7734217ec52433 (diff) |
gpu: nvgpu: Replace kref for refcounting in nvgpu
- added wrapper struct nvgpu_ref over nvgpu_atomic_t
- added nvgpu_ref_* APIs to access the above struct
JIRA NVGPU-140
Change-Id: Id47f897995dd4721751f7610b6d4d4fbfe4d6b9a
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1540899
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h index 40e12105..9195d3d3 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.h | |||
@@ -25,7 +25,7 @@ struct channel_gk20a; | |||
25 | 25 | ||
26 | bool gk20a_is_channel_marked_as_tsg(struct channel_gk20a *ch); | 26 | bool gk20a_is_channel_marked_as_tsg(struct channel_gk20a *ch); |
27 | struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g); | 27 | struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g); |
28 | void gk20a_tsg_release(struct kref *ref); | 28 | void gk20a_tsg_release(struct nvgpu_ref *ref); |
29 | 29 | ||
30 | int gk20a_init_tsg_support(struct gk20a *g, u32 tsgid); | 30 | int gk20a_init_tsg_support(struct gk20a *g, u32 tsgid); |
31 | struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch); | 31 | struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch); |
@@ -36,7 +36,7 @@ struct tsg_gk20a { | |||
36 | bool in_use; | 36 | bool in_use; |
37 | int tsgid; | 37 | int tsgid; |
38 | 38 | ||
39 | struct kref refcount; | 39 | struct nvgpu_ref refcount; |
40 | 40 | ||
41 | struct nvgpu_list_node ch_list; | 41 | struct nvgpu_list_node ch_list; |
42 | int num_active_channels; | 42 | int num_active_channels; |