summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/nouveau_screen.h
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2011-10-08 23:05:25 +0200
committerMarcin Slusarz <marcin.slusarz@gmail.com>2011-10-09 14:49:30 +0200
commit9849f366cbfd781ebeca725058029b70c96836f9 (patch)
treec7a300247b7b31e49d926b502e8e9b7cb0dd88c0 /src/gallium/drivers/nouveau/nouveau_screen.h
parent0110aa09e5898987ee86586e438ac571075eba3a (diff)
nouveau: fix fence hang
If there is not enough space in pushbuffer for fence emission (nouveau_fence_emit -> nv50_screen_fence_emit -> MARK_RING), the pushbuffer is flushed, which through flush_notify -> nv50_default_flush_notify -> nouveau_fence_update marks currently emitting fence as flushed. But actual emission is done after this mark. So later when there is a need to wait on this fence and pushbuffer was not flushed in between, fence wait will never finish causing application to hang. To fix this, introduce new fence state between AVAILABLE and EMITTED, set it before emission and handle it everywhere. Additionally obtain fence sequence numbers after possible flush in MARK_RING, because we want to emit fences in correct order. Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at> Note: This is a candidate for the 7.11 branch.
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_screen.h')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index cf291c6c595..808500f3002 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -24,7 +24,7 @@ struct nouveau_screen {
struct nouveau_fence *current;
u32 sequence;
u32 sequence_ack;
- void (*emit)(struct pipe_screen *, u32 sequence);
+ void (*emit)(struct pipe_screen *, u32 *sequence);
u32 (*update)(struct pipe_screen *);
} fence;