diff options
author | Lionel Landwerlin <[email protected]> | 2018-08-28 11:41:42 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-03-07 15:08:31 +0000 |
commit | acb50d6b1ff1b73a66e88862c99b65d87869e01d (patch) | |
tree | 902cd99aa632419a6fbb1e21ec87c7281982a5e0 /src/intel/common | |
parent | ec526d6ba0bdb996416b7479330a424ff737df81 (diff) |
intel/decoders: handle decoding MI_BBS from ring
An MI_BATCH_BUFFER_START in the ring buffer acts as a second level
batchbuffer (aka jump back to ring buffer when running into a
MI_BATCH_BUFFER_END).
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src/intel/common')
-rw-r--r-- | src/intel/common/gen_batch_decoder.c | 6 | ||||
-rw-r--r-- | src/intel/common/gen_decoder.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/common/gen_batch_decoder.c b/src/intel/common/gen_batch_decoder.c index 8eff5d171a5..becb708da65 100644 --- a/src/intel/common/gen_batch_decoder.c +++ b/src/intel/common/gen_batch_decoder.c @@ -805,7 +805,7 @@ struct custom_decoder { void gen_print_batch(struct gen_batch_decode_ctx *ctx, const uint32_t *batch, uint32_t batch_size, - uint64_t batch_addr) + uint64_t batch_addr, bool from_ring) { const uint32_t *p, *end = batch + batch_size / sizeof(uint32_t); int length; @@ -887,7 +887,7 @@ gen_print_batch(struct gen_batch_decode_ctx *ctx, next_batch_addr); } else { gen_print_batch(ctx, next_batch.map, next_batch.size, - next_batch.addr); + next_batch.addr, false); } if (second_level) { /* MI_BATCH_BUFFER_START with "2nd Level Batch Buffer" set acts @@ -896,7 +896,7 @@ gen_print_batch(struct gen_batch_decode_ctx *ctx, * MI_BATCH_BUFFER_END. */ continue; - } else { + } else if (!from_ring) { /* MI_BATCH_BUFFER_START with "2nd Level Batch Buffer" unset acts * like a goto. Nothing after it will ever get processed. In * order to prevent the recursion from growing, we just reset the diff --git a/src/intel/common/gen_decoder.h b/src/intel/common/gen_decoder.h index 6ab0b66aca3..f5f38078442 100644 --- a/src/intel/common/gen_decoder.h +++ b/src/intel/common/gen_decoder.h @@ -254,7 +254,7 @@ void gen_batch_decode_ctx_finish(struct gen_batch_decode_ctx *ctx); void gen_print_batch(struct gen_batch_decode_ctx *ctx, const uint32_t *batch, uint32_t batch_size, - uint64_t batch_addr); + uint64_t batch_addr, bool from_ring); #ifdef __cplusplus } |