etnaviv: stall after RS/BLT operation when draw_stall debug option is enabled
RS and BLT operations can exhibit issues in some cases. To help in debugging such issues stall after RS and BLT operations when ETNA_MESA_DEBUG=draw_stall is enabled. In that case the FE will point right at the faulty RS/BLT operation, instead of the next stall which may be many state loads later. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32444>
This commit is contained in:
@@ -142,6 +142,9 @@ emit_blt_clearimage(struct etna_cmd_stream *stream, const struct blt_clear_op *o
|
||||
etna_set_state(stream, VIVS_BLT_COMMAND, VIVS_BLT_COMMAND_COMMAND_CLEAR_IMAGE);
|
||||
etna_set_state(stream, VIVS_BLT_SET_COMMAND, 0x00000003);
|
||||
etna_set_state(stream, VIVS_BLT_ENABLE, 0x00000000);
|
||||
|
||||
if (DBG_ENABLED(ETNA_DBG_DRAW_STALL))
|
||||
etna_stall(stream, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
|
||||
}
|
||||
|
||||
/* Copy (a subset of) an image to another image. */
|
||||
@@ -187,6 +190,9 @@ emit_blt_copyimage(struct etna_cmd_stream *stream, const struct blt_imgcopy_op *
|
||||
etna_set_state(stream, VIVS_BLT_COMMAND, VIVS_BLT_COMMAND_COMMAND_COPY_IMAGE);
|
||||
etna_set_state(stream, VIVS_BLT_SET_COMMAND, 0x00000003);
|
||||
etna_set_state(stream, VIVS_BLT_ENABLE, 0x00000000);
|
||||
|
||||
if (DBG_ENABLED(ETNA_DBG_DRAW_STALL))
|
||||
etna_stall(stream, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
|
||||
}
|
||||
|
||||
/* Emit in-place resolve using BLT. */
|
||||
@@ -209,6 +215,9 @@ emit_blt_inplace(struct etna_cmd_stream *stream, const struct blt_inplace_op *op
|
||||
etna_set_state(stream, VIVS_BLT_COMMAND, 0x00000004);
|
||||
etna_set_state(stream, VIVS_BLT_SET_COMMAND, 0x00000003);
|
||||
etna_set_state(stream, VIVS_BLT_ENABLE, 0x00000000);
|
||||
|
||||
if (DBG_ENABLED(ETNA_DBG_DRAW_STALL))
|
||||
etna_stall(stream, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -277,6 +277,9 @@ etna_submit_rs_state(struct etna_context *ctx,
|
||||
/*20/21*/ EMIT_STATE(RS_KICKER, 0xbeebbeeb);
|
||||
etna_coalesce_end(stream, &coalesce);
|
||||
}
|
||||
|
||||
if (DBG_ENABLED(ETNA_DBG_DRAW_STALL))
|
||||
etna_stall(stream, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE);
|
||||
}
|
||||
|
||||
/* Generate clear command for a surface (non-fast clear case) */
|
||||
|
Reference in New Issue
Block a user