]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: set the initial value of pm info to zero
authorXiaojian Du <Xiaojian.Du@amd.com>
Tue, 13 Oct 2020 08:43:25 +0000 (16:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Oct 2020 04:58:18 +0000 (00:58 -0400)
commit800c53d6870a93111e25cd95c6fd1ab306122d27
treeadfc99cd17e7fd02b8bb20e49e419827f390b5fb
parentea8ca1febd3cf6bd2284a02d8601f8d2ac1e91d0
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>
drivers/gpu/drm/amd/pm/amdgpu_pm.c