summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-10-16 17:58:17 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-17 17:05:19 -0400
commite039dcbc9dd7d0c47895bdbb49cdc3e1d11a3cae (patch)
tree38de57b02173520e7a279775f82e3b48e3c1aa87 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent8f55976d4952020f1e7f257087bb79cfeb64f193 (diff)
gpu: nvgpu: Use nvgpu_rwsem as TSG channel lock
Use abstract nvgpu_rwsem as TSG channel list lock instead of the Linux specific rw_semaphore. JIRA NVGPU-259 Change-Id: I41a38b29d4651838b1962d69f102af1384e12cb6 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1579935 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 1ade6b6a..57c1c0bc 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -5091,7 +5091,7 @@ static void gk20a_gr_set_error_notifier(struct gk20a *g,
5091 5091
5092 if (gk20a_is_channel_marked_as_tsg(ch)) { 5092 if (gk20a_is_channel_marked_as_tsg(ch)) {
5093 tsg = &g->fifo.tsg[ch->tsgid]; 5093 tsg = &g->fifo.tsg[ch->tsgid];
5094 down_read(&tsg->ch_list_lock); 5094 nvgpu_rwsem_down_read(&tsg->ch_list_lock);
5095 list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { 5095 list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) {
5096 if (gk20a_channel_get(ch_tsg)) { 5096 if (gk20a_channel_get(ch_tsg)) {
5097 gk20a_set_error_notifier(ch_tsg, 5097 gk20a_set_error_notifier(ch_tsg,
@@ -5099,7 +5099,7 @@ static void gk20a_gr_set_error_notifier(struct gk20a *g,
5099 gk20a_channel_put(ch_tsg); 5099 gk20a_channel_put(ch_tsg);
5100 } 5100 }
5101 } 5101 }
5102 up_read(&tsg->ch_list_lock); 5102 nvgpu_rwsem_up_read(&tsg->ch_list_lock);
5103 } else { 5103 } else {
5104 gk20a_set_error_notifier(ch, error_notifier); 5104 gk20a_set_error_notifier(ch, error_notifier);
5105 } 5105 }