Skip to content

Commit 89df3db

Browse files
bokun-xxmtgalexdeucher
authored andcommitted
drm/amdgpu/pm: Add notification for no DC support
- There is a DPM issue where if DC is not present, FCLK will stay at low level. We need to send a SMU message to configure the DPM - Reuse smu_v13_0_notify_display_change() for this purpose Reviewed-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Bokun Zhang <bokun.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 44e60b1 commit 89df3db

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,10 +1031,7 @@ struct pptable_funcs {
10311031
enum smu_feature_mask mask);
10321032

10331033
/**
1034-
* @notify_display_change: Enable fast memory clock switching.
1035-
*
1036-
* Allows for fine grained memory clock switching but has more stringent
1037-
* timing requirements.
1034+
* @notify_display_change: General interface call to let SMU know about DC change
10381035
*/
10391036
int (*notify_display_change)(struct smu_context *smu);
10401037

drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_0_ppsmc.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@
138138
#define PPSMC_MSG_SetBadMemoryPagesRetiredFlagsPerChannel 0x4A
139139
#define PPSMC_MSG_SetPriorityDeltaGain 0x4B
140140
#define PPSMC_MSG_AllowIHHostInterrupt 0x4C
141-
#define PPSMC_Message_Count 0x4D
141+
142+
#define PPSMC_MSG_DALNotPresent 0x4E
143+
144+
#define PPSMC_Message_Count 0x4F
142145

143146
//Debug Dump Message
144147
#define DEBUGSMC_MSG_TestMessage 0x1

drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@
245245
__SMU_DUMMY_MAP(AllowGpo), \
246246
__SMU_DUMMY_MAP(Mode2Reset), \
247247
__SMU_DUMMY_MAP(RequestI2cTransaction), \
248-
__SMU_DUMMY_MAP(GetMetricsTable),
248+
__SMU_DUMMY_MAP(GetMetricsTable), \
249+
__SMU_DUMMY_MAP(DALNotPresent),
249250

250251
#undef __SMU_DUMMY_MAP
251252
#define __SMU_DUMMY_MAP(type) SMU_MSG_##type

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -837,12 +837,8 @@ int smu_v13_0_notify_display_change(struct smu_context *smu)
837837
{
838838
int ret = 0;
839839

840-
if (!smu->pm_enabled)
841-
return ret;
842-
843-
if (smu_cmn_feature_is_enabled(smu, SMU_FEATURE_DPM_UCLK_BIT) &&
844-
smu->adev->gmc.vram_type == AMDGPU_VRAM_TYPE_HBM)
845-
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetUclkFastSwitch, 1, NULL);
840+
if (!amdgpu_device_has_dc_support(smu->adev))
841+
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_DALNotPresent, NULL);
846842

847843
return ret;
848844
}

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_0_message_map[SMU_MSG_MAX_COUNT] =
162162
MSG_MAP(AllowGpo, PPSMC_MSG_SetGpoAllow, 0),
163163
MSG_MAP(AllowIHHostInterrupt, PPSMC_MSG_AllowIHHostInterrupt, 0),
164164
MSG_MAP(ReenableAcDcInterrupt, PPSMC_MSG_ReenableAcDcInterrupt, 0),
165+
MSG_MAP(DALNotPresent, PPSMC_MSG_DALNotPresent, 0),
165166
};
166167

167168
static struct cmn2asic_mapping smu_v13_0_0_clk_map[SMU_CLK_COUNT] = {
@@ -2687,6 +2688,7 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
26872688
.send_hbm_bad_channel_flag = smu_v13_0_0_send_bad_mem_channel_flag,
26882689
.gpo_control = smu_v13_0_gpo_control,
26892690
.get_ecc_info = smu_v13_0_0_get_ecc_info,
2691+
.notify_display_change = smu_v13_0_notify_display_change,
26902692
};
26912693

26922694
void smu_v13_0_0_set_ppt_funcs(struct smu_context *smu)

0 commit comments

Comments
 (0)