Skip to content

Commit 256edb2

Browse files
ashutoshxThomas Hellström
authored andcommitted
drm/xe/oa: Always set OAG_OAGLBCTXCTRL_COUNTER_RESUME
Reports can be written out to the OA buffer using ways other than periodic sampling. These include mmio trigger and context switches. To support these use cases, when periodic sampling is not enabled, OAG_OAGLBCTXCTRL_COUNTER_RESUME must be set. Fixes: 1db9a9d ("drm/xe/oa: OA stream initialization (OAG)") Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://patch.msgid.link/20251205212613.826224-4-ashutosh.dixit@intel.com (cherry picked from commit 88d98e7) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent 6f0f404 commit 256edb2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

drivers/gpu/drm/xe/xe_oa.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,11 +1105,12 @@ static int xe_oa_enable_metric_set(struct xe_oa_stream *stream)
11051105
oag_buf_size_select(stream) |
11061106
oag_configure_mmio_trigger(stream, true));
11071107

1108-
xe_mmio_write32(mmio, __oa_regs(stream)->oa_ctx_ctrl, stream->periodic ?
1109-
(OAG_OAGLBCTXCTRL_COUNTER_RESUME |
1108+
xe_mmio_write32(mmio, __oa_regs(stream)->oa_ctx_ctrl,
1109+
OAG_OAGLBCTXCTRL_COUNTER_RESUME |
1110+
(stream->periodic ?
11101111
OAG_OAGLBCTXCTRL_TIMER_ENABLE |
11111112
REG_FIELD_PREP(OAG_OAGLBCTXCTRL_TIMER_PERIOD_MASK,
1112-
stream->period_exponent)) : 0);
1113+
stream->period_exponent) : 0));
11131114

11141115
/*
11151116
* Initialize Super Queue Internal Cnt Register

0 commit comments

Comments
 (0)