Skip to content

Commit 8135f1c

Browse files
zehortigozalucasdemarchi
authored andcommitted
drm/xe/oa: Don't reset OAC_CONTEXT_ENABLE on OA stream close
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. v2: Make the change that we don't reset the bit clearer (Ashutosh) Also make the same fix for OAC as OAR (Ashutosh) Bspec: 60314 Fixes: 2f4a730 ("drm/xe/oa: Add OAR support") Fixes: 14e077f ("drm/xe/oa: Add OAC support") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2821 Signed-off-by: José Roberto de Souza <[email protected]> Signed-off-by: Ashutosh Dixit <[email protected]> Cc: [email protected] Reviewed-by: Ashutosh Dixit <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 0c8650b) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 67801fa commit 8135f1c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/gpu/drm/xe/xe_oa.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,7 @@ static int xe_oa_configure_oar_context(struct xe_oa_stream *stream, bool enable)
709709
{
710710
RING_CONTEXT_CONTROL(stream->hwe->mmio_base),
711711
regs_offset + CTX_CONTEXT_CONTROL,
712-
_MASKED_FIELD(CTX_CTRL_OAC_CONTEXT_ENABLE,
713-
enable ? CTX_CTRL_OAC_CONTEXT_ENABLE : 0)
712+
_MASKED_BIT_ENABLE(CTX_CTRL_OAC_CONTEXT_ENABLE),
714713
},
715714
};
716715
struct xe_oa_reg reg_lri = { OAR_OACONTROL, oacontrol };
@@ -742,10 +741,8 @@ static int xe_oa_configure_oac_context(struct xe_oa_stream *stream, bool enable)
742741
{
743742
RING_CONTEXT_CONTROL(stream->hwe->mmio_base),
744743
regs_offset + CTX_CONTEXT_CONTROL,
745-
_MASKED_FIELD(CTX_CTRL_OAC_CONTEXT_ENABLE,
746-
enable ? CTX_CTRL_OAC_CONTEXT_ENABLE : 0) |
747-
_MASKED_FIELD(CTX_CTRL_RUN_ALONE,
748-
enable ? CTX_CTRL_RUN_ALONE : 0),
744+
_MASKED_BIT_ENABLE(CTX_CTRL_OAC_CONTEXT_ENABLE) |
745+
_MASKED_FIELD(CTX_CTRL_RUN_ALONE, enable ? CTX_CTRL_RUN_ALONE : 0),
749746
},
750747
};
751748
struct xe_oa_reg reg_lri = { OAC_OACONTROL, oacontrol };

0 commit comments

Comments
 (0)