drm/amd: Decrease message level for legacy-pm prints
Subsystems (3)
PATCH 1/1 drm/amd: Decrease message level for legacy-pm prints
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]>
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(-)
drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c +6 -10
@@ -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); }
Signature · 1 line
2.43.0
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.
Quoted 52 lines · Mario Limonciello
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]>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(-)drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c +6
-11@@ -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