On Wed, Oct 4, 2023 at 10:46 AM Wang, Yang(Kevin) <KevinYang.Wang@xxxxxxx> wrote: > > Hi Alex, > > why need to switch profile twice for smu 13.0.0 ? in idle state : set compute profile then set power save profile? > Afaik, Pmfw always uses the last set result to represent the current profile. > But it shouldn't affect the results. Anyway. We want to be setting both workload bits (powersave and compute). I guess this won't work as is? I thought the code or'ed both bits. Alex > > Reviewed-by: Yang Wang <kevinyang.wang@xxxxxxx> > > Best Regards, > Kevin > > -----Original Message----- > From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Alex Deucher > Sent: Wednesday, October 4, 2023 10:04 PM > To: Deucher, Alexander <Alexander.Deucher@xxxxxxx> > Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Subject: Re: [PATCH] drm/amdgpu: Enable SMU 13.0.0 optimizations when ROCm is active > > Ping? > > On Tue, Oct 3, 2023 at 6:47 PM Alex Deucher <alexander.deucher@xxxxxxx> wrote: > > > > When ROCm is active enable additional SMU 13.0.0 optimizations. > > This reuses the unused powersave profile on PMFW. > > > > Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c > > index 38b5457baded..b6c0c42de725 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c > > @@ -714,6 +714,14 @@ void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle) > > amdgpu_dpm_switch_power_profile(adev, > > PP_SMC_POWER_PROFILE_COMPUTE, > > !idle); > > + /* Add optimizations for SMU13.0.0. Reuse the power saving profile */ > > + if ((amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0)) && > > + ((adev->pm.fw_version == 0x004e6601) || > > + (adev->pm.fw_version >= 0x004e7300))) { > > + amdgpu_dpm_switch_power_profile(adev, > > + PP_SMC_POWER_PROFILE_POWERSAVING, > > + !idle); > > + } > > } > > > > bool amdgpu_amdkfd_is_kfd_vmid(struct amdgpu_device *adev, u32 vmid) > > -- > > 2.41.0 > >