Skip to content

Commit 0610b9e

Browse files
rodrigovivilutzbichler
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Cavitt <[email protected]> #v3 Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 69f6c43 commit 0610b9e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

drivers/gpu/drm/xe/xe_guc_pc.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,27 @@ static int pc_init_freqs(struct xe_guc_pc *pc)
10081008
return ret;
10091009
}
10101010

1011+
static int slpc_enable_dcc(struct xe_guc_pc *pc)
1012+
{
1013+
int ret;
1014+
1015+
ret = pc_action_set_param(pc, SLPC_PARAM_TASK_ENABLE_DCC, 1);
1016+
if (ret)
1017+
return ret;
1018+
1019+
return pc_action_set_param(pc, SLPC_PARAM_TASK_DISABLE_DCC, 0);
1020+
}
1021+
1022+
static int slpc_set_policies(struct xe_guc_pc *pc)
1023+
{
1024+
struct xe_device *xe = pc_to_xe(pc);
1025+
1026+
if (xe->info.platform == XE_LUNARLAKE)
1027+
return slpc_enable_dcc(pc);
1028+
1029+
return 0;
1030+
}
1031+
10111032
/**
10121033
* xe_guc_pc_start - Start GuC's Power Conservation component
10131034
* @pc: Xe_GuC_PC instance
@@ -1064,6 +1085,10 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
10641085
ktime_ms_delta(ktime_get(), earlier));
10651086
}
10661087

1088+
ret = slpc_set_policies(pc);
1089+
if (ret)
1090+
goto out;
1091+
10671092
ret = pc_init_freqs(pc);
10681093
if (ret)
10691094
goto out;

0 commit comments

Comments
 (0)