]> Git Repo - linux.git/commitdiff
drm/amd/pm: Update intermediate power state for SI
authorLijo Lazar <[email protected]>
Thu, 23 Sep 2021 03:58:43 +0000 (11:58 +0800)
committerAlex Deucher <[email protected]>
Thu, 23 Sep 2021 20:35:19 +0000 (16:35 -0400)
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.

For ex: on platforms where PCI speed change is supported through ACPI
ATCS method, the link speed of current state needs to be queried before
deciding on changing to final power state's link speed. The logic to query
ATCS-support was broken on certain platforms. The issue became visible
when broken ATCS-support logic got fixed with commit
f9b7f3703ff9 ("drm/amdgpu/acpi: make ATPX/ATCS structures global (v2)").

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

Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/pm/powerplay/si_dpm.c

index bdbbeb959c681453ae5447c83161bbd01adee98d..81f82aa05ec287234094c02d6e4f5fde5b28dc0e 100644 (file)
@@ -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;
 }
 
This page took 0.091754 seconds and 4 git commands to generate.