Skip to content

Commit c287399

Browse files
vsbelgaumgregkh
authored andcommitted
drm/xe/ptl: Disable DCC on PTL
[ Upstream commit 801a6e6 ] 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 40ee63f5df2d5c6471b583df800aac89dc0502a4) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ede7b0f commit c287399

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
@@ -1231,6 +1231,36 @@ int xe_guc_pc_set_power_profile(struct xe_guc_pc *pc, const char *buf)
12311231
return ret;
12321232
}
12331233

1234+
static int pc_action_set_dcc(struct xe_guc_pc *pc, bool enable)
1235+
{
1236+
int ret;
1237+
1238+
ret = pc_action_set_param(pc,
1239+
SLPC_PARAM_TASK_ENABLE_DCC,
1240+
enable);
1241+
if (!ret)
1242+
return pc_action_set_param(pc,
1243+
SLPC_PARAM_TASK_DISABLE_DCC,
1244+
!enable);
1245+
else
1246+
return ret;
1247+
}
1248+
1249+
static int pc_modify_defaults(struct xe_guc_pc *pc)
1250+
{
1251+
struct xe_device *xe = pc_to_xe(pc);
1252+
struct xe_gt *gt = pc_to_gt(pc);
1253+
int ret = 0;
1254+
1255+
if (xe->info.platform == XE_PANTHERLAKE) {
1256+
ret = pc_action_set_dcc(pc, false);
1257+
if (unlikely(ret))
1258+
xe_gt_err(gt, "Failed to modify DCC default: %pe\n", ERR_PTR(ret));
1259+
}
1260+
1261+
return ret;
1262+
}
1263+
12341264
/**
12351265
* xe_guc_pc_start - Start GuC's Power Conservation component
12361266
* @pc: Xe_GuC_PC instance
@@ -1288,6 +1318,10 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
12881318
ktime_ms_delta(ktime_get(), earlier));
12891319
}
12901320

1321+
ret = pc_modify_defaults(pc);
1322+
if (ret)
1323+
return ret;
1324+
12911325
ret = pc_init_freqs(pc);
12921326
if (ret)
12931327
goto out;

0 commit comments

Comments
 (0)