I think we need to also modify kv_dpm_print_power_state() and si_dpm_print_power_state(). Both send power state info through DRM_INFO, which should be decreased in the same way.
On Wed, Jun 18, 2025 at 5:32 PM Mario Limonciello <[email protected]> wrote: > > From: Mario Limonciello <[email protected]> > > legacy-pm has prints while changing power states that don't have > a level and thus are printed by default. These are not useful at > runtime for most people, so decrease them to debug. > > Reported-by: Alexandre Demers <[email protected]> > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4322 > Signed-off-by: Mario Limonciello <[email protected]> > --- > drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c > b/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c > index c7518b13e7879..5b09c5fd9dc13 100644 > --- a/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c > +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c > @@ -123,14 +123,10 @@ void amdgpu_dpm_print_cap_info(u32 caps) > void amdgpu_dpm_print_ps_status(struct amdgpu_device *adev, > struct amdgpu_ps *rps) > { > - printk("\tstatus:"); > - if (rps == adev->pm.dpm.current_ps) > - pr_cont(" c"); > - if (rps == adev->pm.dpm.requested_ps) > - pr_cont(" r"); > - if (rps == adev->pm.dpm.boot_ps) > - pr_cont(" b"); > - pr_cont("\n"); > + drm_dbg(adev_to_drm(adev), "\tstatus:%s%s%s\n", > + rps == adev->pm.dpm.current_ps ? " c" : "", > + rps == adev->pm.dpm.requested_ps ? " r" : "", > + rps == adev->pm.dpm.boot_ps ? " b" : ""); > } > > void amdgpu_pm_print_power_states(struct amdgpu_device *adev) > @@ -943,9 +939,9 @@ static int amdgpu_dpm_change_power_state_locked(struct > amdgpu_device *adev) > return -EINVAL; > > if (amdgpu_dpm == 1 && pp_funcs->print_power_state) { > - printk("switching from power state:\n"); > + drm_dbg(adev_to_drm(adev), "switching from power state\n"); > amdgpu_dpm_print_power_state(adev, adev->pm.dpm.current_ps); > - printk("switching to power state:\n"); > + drm_dbg(adev_to_drm(adev), "switching to power state\n"); > amdgpu_dpm_print_power_state(adev, adev->pm.dpm.requested_ps); > } > > -- > 2.43.0 >
