Skip to content

Commit 801a6e6

Browse files
vsbelgaumrodrigovivi
authored andcommitted
drm/xe/ptl: Disable DCC on PTL
On PTL, the recommendation is to disable DCC(Duty Cycle Control) as it may cause some regressions due to added latencies. Upcoming GuC releases will disable DCC on PTL as well, but we need to force it in KMD so that this behavior is propagated to older kernels. v2: Update commit message (Rodrigo) v3: Rebase v4: Fix typo: s/propagted/propagated Fixes: 5cdb71d ("drm/xe/ptl: Add GuC FW definition for PTL") Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Link: https://patch.msgid.link/20260124005917.398522-1-vinay.belgaumkar@intel.com Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (cherry picked from commit 40ee63f) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent d39fb5c commit 801a6e6

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

drivers/gpu/drm/xe/xe_guc_pc.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,36 @@ int xe_guc_pc_set_power_profile(struct xe_guc_pc *pc, const char *buf)
11981198
return ret;
11991199
}
12001200

1201+
static int pc_action_set_dcc(struct xe_guc_pc *pc, bool enable)
1202+
{
1203+
int ret;
1204+
1205+
ret = pc_action_set_param(pc,
1206+
SLPC_PARAM_TASK_ENABLE_DCC,
1207+
enable);
1208+
if (!ret)
1209+
return pc_action_set_param(pc,
1210+
SLPC_PARAM_TASK_DISABLE_DCC,
1211+
!enable);
1212+
else
1213+
return ret;
1214+
}
1215+
1216+
static int pc_modify_defaults(struct xe_guc_pc *pc)
1217+
{
1218+
struct xe_device *xe = pc_to_xe(pc);
1219+
struct xe_gt *gt = pc_to_gt(pc);
1220+
int ret = 0;
1221+
1222+
if (xe->info.platform == XE_PANTHERLAKE) {
1223+
ret = pc_action_set_dcc(pc, false);
1224+
if (unlikely(ret))
1225+
xe_gt_err(gt, "Failed to modify DCC default: %pe\n", ERR_PTR(ret));
1226+
}
1227+
1228+
return ret;
1229+
}
1230+
12011231
/**
12021232
* xe_guc_pc_start - Start GuC's Power Conservation component
12031233
* @pc: Xe_GuC_PC instance
@@ -1249,6 +1279,10 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
12491279
ktime_ms_delta(ktime_get(), earlier));
12501280
}
12511281

1282+
ret = pc_modify_defaults(pc);
1283+
if (ret)
1284+
return ret;
1285+
12521286
ret = pc_init_freqs(pc);
12531287
if (ret)
12541288
return ret;

0 commit comments

Comments
 (0)