summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-11-18 10:44:28 +0100
committerChristian Gmeiner <[email protected]>2017-11-30 07:27:43 +0100
commit571d980695cb434ad28ae0af959157e65598bcbb (patch)
tree6e9b9cf6f1ec8c943dbbb4a4c42936ccc065bef8 /src/gallium/drivers
parent150d8766eae9870bc7fc59bad0f8be8dcf6a24cd (diff)
etnaviv: GC7000: Support BLT as recipient for etna_stall
When the BLT is involved as source or target, add an extra BLT enable/disable sequence around the sync sequence. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_emit.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c
index c24831c88bd..279aa625fcb 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_emit.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c
@@ -41,6 +41,7 @@
#include "etnaviv_zsa.h"
#include "hw/common.xml.h"
#include "hw/state.xml.h"
+#include "hw/state_blt.xml.h"
#include "util/u_math.h"
struct etna_coalesce {
@@ -60,8 +61,15 @@ CMD_STALL(struct etna_cmd_stream *stream, uint32_t from, uint32_t to)
void
etna_stall(struct etna_cmd_stream *stream, uint32_t from, uint32_t to)
{
- etna_cmd_stream_reserve(stream, 4);
+ bool blt = (from == SYNC_RECIPIENT_BLT) || (to == SYNC_RECIPIENT_BLT);
+ etna_cmd_stream_reserve(stream, blt ? 8 : 4);
+ if (blt) {
+ etna_emit_load_state(stream, VIVS_BLT_ENABLE >> 2, 1, 0);
+ etna_cmd_stream_emit(stream, 1);
+ }
+
+ /* TODO: set bit 28/29 of token after BLT COPY_BUFFER */
etna_emit_load_state(stream, VIVS_GL_SEMAPHORE_TOKEN >> 2, 1, 0);
etna_cmd_stream_emit(stream, VIVS_GL_SEMAPHORE_TOKEN_FROM(from) | VIVS_GL_SEMAPHORE_TOKEN_TO(to));
@@ -73,6 +81,11 @@ etna_stall(struct etna_cmd_stream *stream, uint32_t from, uint32_t to)
etna_emit_load_state(stream, VIVS_GL_STALL_TOKEN >> 2, 1, 0);
etna_cmd_stream_emit(stream, VIVS_GL_STALL_TOKEN_FROM(from) | VIVS_GL_STALL_TOKEN_TO(to));
}
+
+ if (blt) {
+ etna_emit_load_state(stream, VIVS_BLT_ENABLE >> 2, 1, 0);
+ etna_cmd_stream_emit(stream, 0);
+ }
}
static void