diff options
author | Marek Olšák <[email protected]> | 2017-08-24 23:46:46 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-28 21:45:33 +0200 |
commit | 39205f216e5912df5f6ae9c4ded1a812a19929dd (patch) | |
tree | c7e751d306304c3dcecdaa77d9503932a6ac2477 /src/gallium | |
parent | 61187c1689bcd0498644705a8deaf6d0244866f3 (diff) |
gallium/radeon: set EVENT_WRITE_EOP.INT_SEL = wait for write confirmation
Ported from Vulkan.
Not sure what this is good for.. maybe write confirmation from L2 flushes?
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 7226fc21a04..7c12565d162 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -109,6 +109,12 @@ void r600_gfx_write_event_eop(struct r600_common_context *ctx, unsigned op = EVENT_TYPE(event) | EVENT_INDEX(5) | event_flags; + unsigned sel = EOP_DATA_SEL(data_sel); + + /* Wait for write confirmation before writing data, but don't send + * an interrupt. */ + if (ctx->chip_class >= SI && data_sel != EOP_DATA_SEL_DISCARD) + sel |= EOP_INT_SEL(EOP_INT_SEL_SEND_DATA_AFTER_WR_CONFIRM); if (ctx->chip_class >= GFX9) { /* A ZPASS_DONE or PIXEL_STAT_DUMP_EVENT (of the DB occlusion @@ -136,7 +142,7 @@ void r600_gfx_write_event_eop(struct r600_common_context *ctx, radeon_emit(cs, PKT3(PKT3_RELEASE_MEM, 6, 0)); radeon_emit(cs, op); - radeon_emit(cs, EOP_DATA_SEL(data_sel)); + radeon_emit(cs, sel); radeon_emit(cs, va); /* address lo */ radeon_emit(cs, va >> 32); /* address hi */ radeon_emit(cs, new_fence); /* immediate data lo */ @@ -155,7 +161,7 @@ void r600_gfx_write_event_eop(struct r600_common_context *ctx, radeon_emit(cs, PKT3(PKT3_EVENT_WRITE_EOP, 4, 0)); radeon_emit(cs, op); radeon_emit(cs, va); - radeon_emit(cs, ((va >> 32) & 0xffff) | EOP_DATA_SEL(data_sel)); + radeon_emit(cs, ((va >> 32) & 0xffff) | sel); radeon_emit(cs, 0); /* immediate data */ radeon_emit(cs, 0); /* unused */ @@ -166,7 +172,7 @@ void r600_gfx_write_event_eop(struct r600_common_context *ctx, radeon_emit(cs, PKT3(PKT3_EVENT_WRITE_EOP, 4, 0)); radeon_emit(cs, op); radeon_emit(cs, va); - radeon_emit(cs, ((va >> 32) & 0xffff) | EOP_DATA_SEL(data_sel)); + radeon_emit(cs, ((va >> 32) & 0xffff) | sel); radeon_emit(cs, new_fence); /* immediate data */ radeon_emit(cs, 0); /* unused */ } |