1 |
From 6499126ea9ebfe8f1c299603a51cc0bcb8babefb Mon Sep 17 00:00:00 2001 |
2 |
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com> |
3 |
Date: Thu, 3 Jan 2019 16:18:48 +0000 |
4 |
Subject: [PATCH 52/78] i965: add CS stall on VF invalidation workaround |
5 |
|
6 |
Even with the previous commit, hangs are still happening. The problem |
7 |
there is that the VF cache invalidate do happen immediately without |
8 |
waiting for previous rendering to complete. What happens is that we |
9 |
invalidate the cache the moment the PIPE_CONTROL is parsed but we |
10 |
still have old rendering in the pipe which continues to pull data into |
11 |
the cache with the old high address bits. The later rendering with the |
12 |
new high address bits then doesn't have the clean cache that it |
13 |
expects/needs. |
14 |
|
15 |
v2: Update commit message/explanation with Jason's |
16 |
|
17 |
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> |
18 |
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> |
19 |
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> |
20 |
Fixes: a363bb2cd0e2a1 ("i965: Allocate VMA in userspace for full-PPGTT systems.") |
21 |
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109072 |
22 |
(cherry picked from commit 31e4c9ce400341df9b0136419b3b3c73b8c9eb7e) |
23 |
--- |
24 |
src/mesa/drivers/dri/i965/genX_blorp_exec.c | 2 +- |
25 |
src/mesa/drivers/dri/i965/genX_state_upload.c | 2 +- |
26 |
2 files changed, 2 insertions(+), 2 deletions(-) |
27 |
|
28 |
diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c |
29 |
index a62b88e166..97ae270704 100644 |
30 |
--- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c |
31 |
+++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c |
32 |
@@ -213,7 +213,7 @@ blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *batch, |
33 |
} |
34 |
|
35 |
if (need_invalidate) { |
36 |
- brw_emit_pipe_control_flush(brw, PIPE_CONTROL_VF_CACHE_INVALIDATE); |
37 |
+ brw_emit_pipe_control_flush(brw, PIPE_CONTROL_VF_CACHE_INVALIDATE | PIPE_CONTROL_CS_STALL); |
38 |
} |
39 |
#endif |
40 |
} |
41 |
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c |
42 |
index 28c60c9edf..ce9a3adcfc 100644 |
43 |
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c |
44 |
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c |
45 |
@@ -534,7 +534,7 @@ vf_invalidate_for_vb_48bit_transitions(struct brw_context *brw) |
46 |
} |
47 |
|
48 |
if (need_invalidate) { |
49 |
- brw_emit_pipe_control_flush(brw, PIPE_CONTROL_VF_CACHE_INVALIDATE); |
50 |
+ brw_emit_pipe_control_flush(brw, PIPE_CONTROL_VF_CACHE_INVALIDATE | PIPE_CONTROL_CS_STALL); |
51 |
} |
52 |
#endif |
53 |
} |
54 |
-- |
55 |
2.20.1 |
56 |
|