[Public] Hi Jesse, > -----Original Message----- > From: Jesse Zhang <jesse.zhang@xxxxxxx> > Sent: Monday, June 3, 2024 4:46 PM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian > <Christian.Koenig@xxxxxxx>; Kuehling, Felix <Felix.Kuehling@xxxxxxx>; > Huang, Tim <Tim.Huang@xxxxxxx>; Zhang, Jesse(Jie) > <Jesse.Zhang@xxxxxxx>; Zhang, Jesse(Jie) <Jesse.Zhang@xxxxxxx> > Subject: [PATCH 01/12] drm/amd/pm: remove dead code in > si_convert_power_level_to_smc > > Since gmc_pg is false, setting mcFlags with SISLANDS_SMC_MC_PG_EN > cannot be reach. > > Signed-off-by: Jesse Zhang <Jesse.Zhang@xxxxxxx> > --- > drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > index 68ac01a8bc3a..a18f75a6d480 100644 > --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c > @@ -5487,9 +5487,6 @@ static int si_convert_power_level_to_smc(struct > amdgpu_device *adev, > (RREG32(DPG_PIPE_STUTTER_CONTROL) & STUTTER_ENABLE) && > (adev->pm.dpm.new_active_crtc_count <= 2)) { > level->mcFlags |= SISLANDS_SMC_MC_STUTTER_EN; > - > - if (gmc_pg) > - level->mcFlags |= SISLANDS_SMC_MC_PG_EN; If remove this, the pmc_pg should never be used, maybe remove the definition of "bool gmc_pg = false" as well? Tim Huang > } > > if (adev->gmc.vram_type == AMDGPU_VRAM_TYPE_GDDR5) { > -- > 2.25.1