Commit 256edb26 authored by Ashutosh Dixit's avatar Ashutosh Dixit Committed by Thomas Hellström
Browse files

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: 1db9a9dc ("drm/xe/oa: OA stream initialization (OAG)")
Signed-off-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: default avatarUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://patch.msgid.link/20251205212613.826224-4-ashutosh.dixit@intel.com


(cherry picked from commit 88d98e74)
Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
parent 6f0f404b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1105,11 +1105,12 @@ static int xe_oa_enable_metric_set(struct xe_oa_stream *stream)
			oag_buf_size_select(stream) |
			oag_configure_mmio_trigger(stream, true));

	xe_mmio_write32(mmio, __oa_regs(stream)->oa_ctx_ctrl, stream->periodic ?
			(OAG_OAGLBCTXCTRL_COUNTER_RESUME |
	xe_mmio_write32(mmio, __oa_regs(stream)->oa_ctx_ctrl,
			OAG_OAGLBCTXCTRL_COUNTER_RESUME |
			(stream->periodic ?
			 OAG_OAGLBCTXCTRL_TIMER_ENABLE |
			 REG_FIELD_PREP(OAG_OAGLBCTXCTRL_TIMER_PERIOD_MASK,
					stream->period_exponent)) : 0);
					 stream->period_exponent) : 0));

	/*
	 * Initialize Super Queue Internal Cnt Register