gallium/radeon: fix a ZPASS comment, EVENT_WRITE_EOP fixups
authorMarek Olšák <marek.olsak@amd.com>
Mon, 3 Oct 2016 13:13:56 +0000 (15:13 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 26 Oct 2016 11:02:58 +0000 (13:02 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/sid.h
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_query.c

index 888de111a1fad94e7e2160a54099501a3357e161..df6309cfa691593a8d600bc72d1968ffc77e7691 100644 (file)
 #define     V_028A90_FLUSH_HS_OUTPUT                                0x11
 #define     V_028A90_FLUSH_LS_OUTPUT                                0x12
 #define     V_028A90_CACHE_FLUSH_AND_INV_TS_EVENT                   0x14
-#define     V_028A90_ZPASS_DONE                                     0x15 /* not on CIK */
+#define     V_028A90_ZPASS_DONE                                     0x15
 #define     V_028A90_CACHE_FLUSH_AND_INV_EVENT                      0x16
 #define     V_028A90_PERFCOUNTER_START                              0x17
 #define     V_028A90_PERFCOUNTER_STOP                               0x18
index 3dbcbc67247f13b0179fc50d9e80d8cb6a862027..c4b70dc6089dd8a372cb20b4508364520705b560 100644 (file)
@@ -94,7 +94,7 @@ void r600_gfx_write_fence(struct r600_common_context *ctx, struct r600_resource
                radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_BOTTOM_OF_PIPE_TS) |
                                EVENT_INDEX(5));
                radeon_emit(cs, va);
-               radeon_emit(cs, (va >> 32) | EOP_DATA_SEL(1));
+               radeon_emit(cs, ((va >> 32) & 0xffff) | EOP_DATA_SEL(1));
                radeon_emit(cs, old_value); /* immediate data */
                radeon_emit(cs, 0); /* unused */
        }
@@ -103,7 +103,7 @@ void r600_gfx_write_fence(struct r600_common_context *ctx, struct r600_resource
        radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_BOTTOM_OF_PIPE_TS) |
                        EVENT_INDEX(5));
        radeon_emit(cs, va);
-       radeon_emit(cs, (va >> 32) | EOP_DATA_SEL(1));
+       radeon_emit(cs, ((va >> 32) & 0xffff) | EOP_DATA_SEL(1));
        radeon_emit(cs, new_value); /* immediate data */
        radeon_emit(cs, 0); /* unused */
 
index 4b6767dd38a7303693abc5491da5595d92c7d4a5..91385ae9820ef21a28a2ec4edcfd9ba830adc26e 100644 (file)
@@ -560,7 +560,7 @@ static void r600_query_hw_do_emit_start(struct r600_common_context *ctx,
                radeon_emit(cs, PKT3(PKT3_EVENT_WRITE_EOP, 4, 0));
                radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_BOTTOM_OF_PIPE_TS) | EVENT_INDEX(5));
                radeon_emit(cs, va);
-               radeon_emit(cs, (3 << 29) | ((va >> 32) & 0xFFFF));
+               radeon_emit(cs, EOP_DATA_SEL(3) | ((va >> 32) & 0xFFFF));
                radeon_emit(cs, 0);
                radeon_emit(cs, 0);
                break;
@@ -646,7 +646,7 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx,
                radeon_emit(cs, PKT3(PKT3_EVENT_WRITE_EOP, 4, 0));
                radeon_emit(cs, EVENT_TYPE(EVENT_TYPE_BOTTOM_OF_PIPE_TS) | EVENT_INDEX(5));
                radeon_emit(cs, va);
-               radeon_emit(cs, (3 << 29) | ((va >> 32) & 0xFFFF));
+               radeon_emit(cs, EOP_DATA_SEL(3) | ((va >> 32) & 0xFFFF));
                radeon_emit(cs, 0);
                radeon_emit(cs, 0);