Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe/lnl: Enable GuC SLPC DCC task

Enable DCC (Duty Cycle Control) in Lunar Lake.

DCC is the SLPC task that tries to keep
the GT from operating inefficiently when thermally constrained.

Although the recommendation is to enable it, LNL GuC is leaving
it disabled by default on LNL.

It would minimize the GT frequency oscillation on throttled
scenarios, which could potentially reduce latencies.

v2: Move set_policies call after wait for running state, so
we ensure it is not overwritten. (Vinay)
v3: Fix English in the commit message (Jonathan)
v4: Also set disable to 0 so DCC can really get into effect.
v5: Avoid lnl_ prefix (Vinay)
v6: Finish renaming...

Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> #v3
Link: https://patchwork.freedesktop.org/patch/msgid/20250115145053.1142023-2-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

+25
+25
drivers/gpu/drm/xe/xe_guc_pc.c
··· 993 993 return ret; 994 994 } 995 995 996 + static int slpc_enable_dcc(struct xe_guc_pc *pc) 997 + { 998 + int ret; 999 + 1000 + ret = pc_action_set_param(pc, SLPC_PARAM_TASK_ENABLE_DCC, 1); 1001 + if (ret) 1002 + return ret; 1003 + 1004 + return pc_action_set_param(pc, SLPC_PARAM_TASK_DISABLE_DCC, 0); 1005 + } 1006 + 1007 + static int slpc_set_policies(struct xe_guc_pc *pc) 1008 + { 1009 + struct xe_device *xe = pc_to_xe(pc); 1010 + 1011 + if (xe->info.platform == XE_LUNARLAKE) 1012 + return slpc_enable_dcc(pc); 1013 + 1014 + return 0; 1015 + } 1016 + 996 1017 /** 997 1018 * xe_guc_pc_start - Start GuC's Power Conservation component 998 1019 * @pc: Xe_GuC_PC instance ··· 1057 1036 ret = -EIO; 1058 1037 goto out; 1059 1038 } 1039 + 1040 + ret = slpc_set_policies(pc); 1041 + if (ret) 1042 + goto out; 1060 1043 1061 1044 ret = pc_init_freqs(pc); 1062 1045 if (ret)