diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-12-08 06:02:16 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-12-20 18:15:51 -0500 |
commit | 339a67b2e84cea20a59334b0640b9ab7e0d75ca9 (patch) | |
tree | fdefebf92b85a7b7b1ccea562f6b000fecf056a4 /drivers/gpu/nvgpu/vgpu | |
parent | 75e52218cec5ccfbb8ec61cb8ba5e41f5e5ec7e5 (diff) |
gpu: nvgpu: replace tsg list mutex with rwsem
Lock only for modifications to the tsg channel list, and allow multiple
concurrent readers.
Bug 1848834
Bug 1814773
Change-Id: Ie3938d4239cfe36a14211f4649ce72b7fc3e2fa4
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1269579
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu')
-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 c3669990..5ffc6a00 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | |||
@@ -651,7 +651,7 @@ static int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch, | |||
651 | if (gk20a_is_channel_marked_as_tsg(ch)) { | 651 | if (gk20a_is_channel_marked_as_tsg(ch)) { |
652 | tsg = &g->fifo.tsg[ch->tsgid]; | 652 | tsg = &g->fifo.tsg[ch->tsgid]; |
653 | 653 | ||
654 | mutex_lock(&tsg->ch_list_lock); | 654 | down_read(&tsg->ch_list_lock); |
655 | 655 | ||
656 | list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { | 656 | list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { |
657 | if (gk20a_channel_get(ch_tsg)) { | 657 | if (gk20a_channel_get(ch_tsg)) { |
@@ -661,7 +661,7 @@ static int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch, | |||
661 | } | 661 | } |
662 | } | 662 | } |
663 | 663 | ||
664 | mutex_unlock(&tsg->ch_list_lock); | 664 | up_read(&tsg->ch_list_lock); |
665 | } else { | 665 | } else { |
666 | gk20a_set_error_notifier(ch, err_code); | 666 | gk20a_set_error_notifier(ch, err_code); |
667 | ch->has_timedout = true; | 667 | ch->has_timedout = true; |