From 339a67b2e84cea20a59334b0640b9ab7e0d75ca9 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 8 Dec 2016 13:02:16 +0200 Subject: 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 Reviewed-on: http://git-master/r/1269579 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/fifo_vgpu.c') 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, if (gk20a_is_channel_marked_as_tsg(ch)) { tsg = &g->fifo.tsg[ch->tsgid]; - mutex_lock(&tsg->ch_list_lock); + down_read(&tsg->ch_list_lock); list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { if (gk20a_channel_get(ch_tsg)) { @@ -661,7 +661,7 @@ static int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch, } } - mutex_unlock(&tsg->ch_list_lock); + up_read(&tsg->ch_list_lock); } else { gk20a_set_error_notifier(ch, err_code); ch->has_timedout = true; -- cgit v1.2.2