All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/pm: Update intermediate power state for SI
@ 2021-09-23  4:29 Lijo Lazar
  2021-09-23 12:25 ` Zhang, Hawking
  2021-09-23 12:51 ` Alex Deucher
  0 siblings, 2 replies; 5+ messages in thread
From: Lijo Lazar @ 2021-09-23  4:29 UTC (permalink / raw)
  To: amd-gfx
  Cc: Alexander.Deucher, Hawking.Zhang, Kevin1.Wang, Kenneth.Feng, Evan.Quan

Update the current state as boot state during dpm initialization.
During the subsequent initialization, set_power_state gets called to
transition to the final power state. set_power_state refers to values
from the current state and without current state populated, it could
result in NULL pointer dereference.

Bug:https://gitlab.freedesktop.org/drm/amd/-/issues/1698

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
---
 drivers/gpu/drm/amd/pm/powerplay/si_dpm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c b/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c
index bdbbeb959c68..81f82aa05ec2 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c
@@ -6867,6 +6867,8 @@ static int si_dpm_enable(struct amdgpu_device *adev)
 	si_enable_auto_throttle_source(adev, AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL, true);
 	si_thermal_start_thermal_controller(adev);
 
+	ni_update_current_ps(adev, boot_ps);
+
 	return 0;
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-23 13:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23  4:29 [PATCH] drm/amd/pm: Update intermediate power state for SI Lijo Lazar
2021-09-23 12:25 ` Zhang, Hawking
2021-09-23 12:51 ` Alex Deucher
2021-09-23 13:04   ` Lazar, Lijo
2021-09-23 13:06     ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.