summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaojian Du <Xiaojian.Du@amd.com>2020-10-13 16:43:25 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-10-30 00:58:18 -0400
commit800c53d6870a93111e25cd95c6fd1ab306122d27 (patch)
treeadfc99cd17e7fd02b8bb20e49e419827f390b5fb
parentea8ca1febd3cf6bd2284a02d8601f8d2ac1e91d0 (diff)
drm/amd/pm: set the initial value of pm info to zero
This patch is to set the initial value of pm info to zero. The "value64" is ported to the hwmon and debugfs node, it is a uint64 type. When it is used for NV10/VEGA10/VEGA20, its word size is appropriate, because NV10/VEGA10/VEGA20 has a 64bit smu feature mask, which is separated to high 32bit and low 32bit. But some asic has only 32bit smu feature mask,and this 32bit mask will fill the low 32bit of "value64". So if this "value64" is not initialized to zero, the high 32bit will be filled by a meaningless value, when the whole "value64" is ported to the "SMC Feature Mask" in the "amdgpu_pm_info" on some specific asic, it will be a wrong value. Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/amdgpu_pm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 89632ee88ae2..080af05724ed 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -3464,7 +3464,7 @@ void amdgpu_pm_sysfs_fini(struct amdgpu_device *adev)
static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *adev)
{
uint32_t value;
- uint64_t value64;
+ uint64_t value64 = 0;
uint32_t query = 0;
int size;