[PATCH 3/3] drm/amd/pm: explicitly initialize cached power limits in smu struct
Darren Powell
darren.powell at amd.com
Sun Oct 3 04:46:58 UTC 2021
Code appears to initialize values but macro will exit without error
or initializing value if function is not implmented
Signed-off-by: Darren Powell <darren.powell at amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index faa78a048b1f..210f047e136d 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -712,6 +712,10 @@ static int smu_late_init(void *handle)
return ret;
}
+ smu->current_power_limit = 0;
+ smu->default_power_limit = 0;
+ smu->max_power_limit = 0;
+
ret = smu_get_asic_power_limits(smu,
&smu->current_power_limit,
&smu->default_power_limit,
--
2.33.0
More information about the amd-gfx
mailing list