Skip to contentSkip to conversation

drm/xe/oa: Don't reset OAC_CONTEXT_ENABLE on OA stream close

PATCH New Ashutosh Dixit 1 participant 1 message Sep 24, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/xe/oa: Don't reset OAC_CONTEXT_ENABLE on OA stream close

From: José Roberto de Souza <[email protected]>

Mesa testing on Xe2+ revealed that when OA metrics are collected for an exec_queue, after the OA stream is closed, future batch buffers submitted on that exec_queue do not complete. Not resetting OAC_CONTEXT_ENABLE on OA stream close resolves these hangs and should not have any adverse effects.

Bspec: 60314

---
 drivers/gpu/drm/xe/xe_oa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/xe/xe_oa.c +1 -1
index 6d17f89a132d2..ee172d5befc82 100644
@@ -774,7 +774,7 @@ static int xe_oa_configure_oar_context(struct xe_oa_stream *stream, bool enable)
 
 	/* Modify stream hwe context image with regs_context */
 	err = xe_oa_modify_ctx_image(stream, stream->exec_q->lrc[0],
-				     regs_context, ARRAY_SIZE(regs_context));
+				     regs_context, enable ? ARRAY_SIZE(regs_context) : 1);
 	if (err)
 		return err;
 
Signature · 1 line
2.41.0