summaryrefslogtreecommitdiff
path: root/r600_pm4.c
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2009-01-29 15:04:39 +0100
committerMatthias Hopf <mhopf@suse.de>2009-01-29 15:04:39 +0100
commit26ec71b288f20c94c1c1c09682270aff57c1f4d3 (patch)
treea90fb65174b10de756a1e2896ad9a12296c773c0 /r600_pm4.c
parent831516b13336f57bdb12bde26533ea90e8cbf132 (diff)
Proper flush_gpu_source_cache().
Also called on upload(), no need for extra syncs. Remove cp_set_surface_sync(), except for _pm4.c
Diffstat (limited to 'r600_pm4.c')
-rw-r--r--r600_pm4.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/r600_pm4.c b/r600_pm4.c
index 3799786..deb849e 100644
--- a/r600_pm4.c
+++ b/r600_pm4.c
@@ -38,6 +38,26 @@
#include "r600_shader.h"
+void cp_set_surface_sync()
+{
+ CMD_BUFFER_PREAMBLE (4*2 + 7 + 2 + 2);
+
+ EREG (CP_COHER_CNTL, 0x19800000);
+ EREG (CP_COHER_SIZE, 0xFFFFFFFF);
+ EREG (CP_COHER_BASE, 0x00000000);
+ PACK3 (IT_WAIT_REG_MEM, 6);
+ E32 (0x00000003); // ME, Register, EqualTo
+ E32 (CP_COHER_STATUS >> 2);
+ E32 (0);
+ E32 (0); // Ref value
+ E32 (STATUS_bit); // Ref mask
+ E32 (10); // Wait interval
+ PACK3 (IT_EVENT_WRITE, 1);
+ E32 (PIPELINESTAT_STOP);
+ PACK3 (IT_EVENT_WRITE, 1);
+ E32 (PERFCOUNTER_STOP);
+}
+
/*
* Simple triangle test
*/