Skip to content

Commit a262cc8

Browse files
ashutoshxrodrigovivi
authored andcommitted
drm/xe/oa: Enable Xe2+ PES disaggregation
Enable Xe2+ PES disaggregation (for OAG) to retrieve disaggregated metrics when disaggregated data is needed. Userspace can select whether to receive aggregated or disaggregated metrics via the particular OA configuration it uses (programmed via DRM_XE_OBSERVATION_OP_ADD_CONFIG). Bspec: 61101 Fixes: e936f88 ("drm/xe/oa/uapi: Expose OA stream fd") Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240909165933.2638765-1-ashutosh.dixit@intel.com Cc: stable@vger.kernel.org (cherry picked from commit fb2551a) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent dd10595 commit a262cc8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/gpu/drm/xe/regs/xe_oa_regs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#define OAG_OABUFFER_MEMORY_SELECT REG_BIT(0) /* 0: PPGTT, 1: GGTT */
5353

5454
#define OAG_OACONTROL XE_REG(0xdaf4)
55+
#define OAG_OACONTROL_OA_PES_DISAG_EN REG_GENMASK(27, 22)
5556
#define OAG_OACONTROL_OA_CCS_SELECT_MASK REG_GENMASK(18, 16)
5657
#define OAG_OACONTROL_OA_COUNTER_SEL_MASK REG_GENMASK(4, 2)
5758
#define OAG_OACONTROL_OA_COUNTER_ENABLE REG_BIT(0)

drivers/gpu/drm/xe/xe_oa.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,10 @@ static void xe_oa_enable(struct xe_oa_stream *stream)
440440
val = __format_to_oactrl(format, regs->oa_ctrl_counter_select_mask) |
441441
__oa_ccs_select(stream) | OAG_OACONTROL_OA_COUNTER_ENABLE;
442442

443+
if (GRAPHICS_VER(stream->oa->xe) >= 20 &&
444+
stream->hwe->oa_unit->type == DRM_XE_OA_UNIT_TYPE_OAG)
445+
val |= OAG_OACONTROL_OA_PES_DISAG_EN;
446+
443447
xe_mmio_write32(stream->gt, regs->oa_ctrl, val);
444448
}
445449

0 commit comments

Comments
 (0)