]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: Update intermediate power state for SI
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 23 Sep 2021 03:58:43 +0000 (11:58 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 23 Sep 2021 21:06:11 +0000 (17:06 -0400)
commit55469e4ba5d81625b367b296b6044336d73bfc3f
treebc07cfa669c75f119f9f0c51c9d897afb2e00632
parentc04b67c89e3672a8b88eedeb4b2c28529a5cdaba
drm/amd/pm: Update intermediate power state for SI

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
f9182ccba267 ("drm/amdgpu/acpi: make ATPX/ATCS structures global (v2)").

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

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/pm/powerplay/si_dpm.c