@@ -844,6 +844,11 @@ static void xe_oa_disable_metric_set(struct xe_oa_stream *stream)
844
844
845
845
/* Reset PMON Enable to save power. */
846
846
xe_mmio_rmw32 (mmio , XELPMP_SQCNT1 , sqcnt1 , 0 );
847
+
848
+ if ((stream -> oa_unit -> type == DRM_XE_OA_UNIT_TYPE_OAM ||
849
+ stream -> oa_unit -> type == DRM_XE_OA_UNIT_TYPE_OAM_SAG ) &&
850
+ GRAPHICS_VER (stream -> oa -> xe ) >= 30 )
851
+ xe_mmio_rmw32 (mmio , OAM_COMPRESSION_T3_CONTROL , OAM_LAT_MEASURE_ENABLE , 0 );
847
852
}
848
853
849
854
static void xe_oa_stream_destroy (struct xe_oa_stream * stream )
@@ -1111,9 +1116,13 @@ static int xe_oa_enable_metric_set(struct xe_oa_stream *stream)
1111
1116
*/
1112
1117
sqcnt1 = SQCNT1_PMON_ENABLE |
1113
1118
(HAS_OA_BPC_REPORTING (stream -> oa -> xe ) ? SQCNT1_OABPC : 0 );
1114
-
1115
1119
xe_mmio_rmw32 (mmio , XELPMP_SQCNT1 , 0 , sqcnt1 );
1116
1120
1121
+ if ((stream -> oa_unit -> type == DRM_XE_OA_UNIT_TYPE_OAM ||
1122
+ stream -> oa_unit -> type == DRM_XE_OA_UNIT_TYPE_OAM_SAG ) &&
1123
+ GRAPHICS_VER (stream -> oa -> xe ) >= 30 )
1124
+ xe_mmio_rmw32 (mmio , OAM_COMPRESSION_T3_CONTROL , 0 , OAM_LAT_MEASURE_ENABLE );
1125
+
1117
1126
/* Configure OAR/OAC */
1118
1127
if (stream -> exec_q ) {
1119
1128
ret = xe_oa_configure_oa_context (stream , true);
@@ -2190,6 +2199,7 @@ static const struct xe_mmio_range gen12_oa_mux_regs[] = {
2190
2199
static const struct xe_mmio_range xe2_oa_mux_regs [] = {
2191
2200
{ .start = 0x5194 , .end = 0x5194 }, /* SYS_MEM_LAT_MEASURE_MERTF_GRP_3D */
2192
2201
{ .start = 0x8704 , .end = 0x8704 }, /* LMEM_LAT_MEASURE_MCFG_GRP */
2202
+ { .start = 0xB01C , .end = 0xB01C }, /* LNCF_MISC_CONFIG_REGISTER0 */
2193
2203
{ .start = 0xB1BC , .end = 0xB1BC }, /* L3_BANK_LAT_MEASURE_LBCF_GFX */
2194
2204
{ .start = 0xD0E0 , .end = 0xD0F4 }, /* VISACTL */
2195
2205
{ .start = 0xE18C , .end = 0xE18C }, /* SAMPLER_MODE */
0 commit comments