SHA256
1
0
forked from pool/Mesa
Mesa/N_04-nv50-Fix-double-lock-in-nv50_hw_sm_get_query_result.patch
Max Staudt 12a58d062e - N_01-WIP-nouveau-add-locking.patch
N_02-nouveau-more-locking-make-sure-that-fence-work-is-always-done-with-the-push-mutex-acquired.patch
  N_03-nv30-locking-fixes.patch
  N_04-nv50-Fix-double-lock-in-nv50_hw_sm_get_query_result.patch
  N_05-Use-nv50_render_condition-in-nv50_blitctx_post_blit.patch

  Backport nouveau locking workaround to enable multithreading.

  Source: https://github.com/imirkin/mesa/commits/locking

  According to the author, crashes may still happen, but much more rarely.

  Tested on GK107.

  N_04-* and N_05-* include untested fixes for nv50.

  Fixes (boo#997171) as suggested in (fdo#91632).

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=540
2016-10-14 09:11:02 +00:00

26 lines
1.0 KiB
Diff

From: Max Staudt <mstaudt@suse.de>
Date: Wed Oct 5 18:49:41 2016 +0200
Subject: [PATCH 4/5]nv50: Fix double lock in nv50_hw_sm_get_query_result()
Patch-mainline: N/A
References: boo#997171
Signed-off-by: Max Staudt <mstaudt@suse.de>
Signed-off-by: Max Staudt <mstaudt@suse.de>
---
src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c
index 31445eb..acc64ac 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_query_hw_sm.c
@@ -351,7 +351,7 @@ nv50_hw_sm_get_query_result(struct nv50_context *nv50, struct nv50_hw_query *hq,
pipe_mutex_lock(nv50->screen->base.push_mutex);
ret = nv50_hw_sm_query_read_data(count, nv50, wait, hq, cfg, mp_count);
- pipe_mutex_lock(nv50->screen->base.push_mutex);
+ pipe_mutex_unlock(nv50->screen->base.push_mutex);
if (!ret)
return false;