Skip to content

Commit 6ef5a04

Browse files
guludolucasdemarchi
authored andcommitted
drm/xe/xe2: Add performance tuning for L3 cache flushing
A recommended performance tuning for LNL related to L3 cache flushing was recently introduced in Bspec. Implement it. Unlike the other existing tuning settings, we limit this one for LNL only, since there is no info about whether this would be applicable to other platforms yet. In the future we can come back and use IP version ranges if applicable. v2: - Fix reference to Bspec. (Sai Teja, Tejas) - Use correct register name for "Tuning: L3 RW flush all Cache". (Sai Teja) - Use SCRATCH3_LBCF (with the underscore) for better readability. v3: - Limit setting to LNL only. (Matt) Bspec: 72161 Cc: Sai Teja Pottumuttu <[email protected]> Cc: Tejas Upadhyay <[email protected]> Cc: Matt Roper <[email protected]> Signed-off-by: Gustavo Sousa <[email protected]> Reviewed-by: Matt Roper <[email protected]> Reviewed-by: Tejas Upadhyay <[email protected]> Signed-off-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 8762531) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 3bf9093 commit 6ef5a04

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@
380380
#define L3SQCREG3 XE_REG_MCR(0xb108)
381381
#define COMPPWOVERFETCHEN REG_BIT(28)
382382

383+
#define SCRATCH3_LBCF XE_REG_MCR(0xb154)
384+
#define RWFLUSHALLEN REG_BIT(17)
385+
383386
#define XEHP_L3SQCREG5 XE_REG_MCR(0xb158)
384387
#define L3_PWM_TIMER_INIT_VAL_MASK REG_GENMASK(9, 0)
385388

@@ -397,6 +400,8 @@
397400

398401
#define XE2LPM_L3SQCREG3 XE_REG_MCR(0xb608)
399402

403+
#define XE2LPM_SCRATCH3_LBCF XE_REG_MCR(0xb654)
404+
400405
#define XE2LPM_L3SQCREG5 XE_REG_MCR(0xb658)
401406

402407
#define XE2_TDF_CTRL XE_REG(0xb418)

drivers/gpu/drm/xe/xe_tuning.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ static const struct xe_rtp_entry_sr gt_tunings[] = {
7575
XE_RTP_ACTIONS(FIELD_SET(STATELESS_COMPRESSION_CTRL, UNIFIED_COMPRESSION_FORMAT,
7676
REG_FIELD_PREP(UNIFIED_COMPRESSION_FORMAT, 0)))
7777
},
78+
{ XE_RTP_NAME("Tuning: L3 RW flush all Cache"),
79+
XE_RTP_RULES(GRAPHICS_VERSION(2004)),
80+
XE_RTP_ACTIONS(SET(SCRATCH3_LBCF, RWFLUSHALLEN))
81+
},
82+
{ XE_RTP_NAME("Tuning: L3 RW flush all cache - media"),
83+
XE_RTP_RULES(MEDIA_VERSION(2000)),
84+
XE_RTP_ACTIONS(SET(XE2LPM_SCRATCH3_LBCF, RWFLUSHALLEN))
85+
},
7886

7987
{}
8088
};

0 commit comments

Comments
 (0)