diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-10-16 17:58:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-17 17:05:19 -0400 |
commit | e039dcbc9dd7d0c47895bdbb49cdc3e1d11a3cae (patch) | |
tree | 38de57b02173520e7a279775f82e3b48e3c1aa87 /drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | |
parent | 8f55976d4952020f1e7f257087bb79cfeb64f193 (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/vgpu/fifo_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index 582894b9..eac720ca 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | |||
@@ -712,7 +712,7 @@ int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch, | |||
712 | if (gk20a_is_channel_marked_as_tsg(ch)) { | 712 | if (gk20a_is_channel_marked_as_tsg(ch)) { |
713 | tsg = &g->fifo.tsg[ch->tsgid]; | 713 | tsg = &g->fifo.tsg[ch->tsgid]; |
714 | 714 | ||
715 | down_read(&tsg->ch_list_lock); | 715 | nvgpu_rwsem_down_read(&tsg->ch_list_lock); |
716 | 716 | ||
717 | list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { | 717 | list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { |
718 | if (gk20a_channel_get(ch_tsg)) { | 718 | if (gk20a_channel_get(ch_tsg)) { |
@@ -722,7 +722,7 @@ int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch, | |||
722 | } | 722 | } |
723 | } | 723 | } |
724 | 724 | ||
725 | up_read(&tsg->ch_list_lock); | 725 | nvgpu_rwsem_up_read(&tsg->ch_list_lock); |
726 | } else { | 726 | } else { |
727 | gk20a_set_error_notifier(ch, err_code); | 727 | gk20a_set_error_notifier(ch, err_code); |
728 | ch->has_timedout = true; | 728 | ch->has_timedout = true; |