linux/drivers/gpu/drm/amd
Nicolas Iooss 0d1da3c152 drm/amd/powerplay: initialize a variable before using it
Function vega10_apply_state_adjust_rules() only initializes
stable_pstate_sclk_dpm_percentage when
data->registry_data.stable_pstate_sclk_dpm_percentage is not between 1
and 100. The variable is then used to compute stable_pstate_sclk, which
therefore uses an uninitialized value.

Fix this by initializing stable_pstate_sclk_dpm_percentage to
data->registry_data.stable_pstate_sclk_dpm_percentage.

This issue has been found while building the kernel with clang. The
compiler reported a -Wsometimes-uninitialized warning.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Fixes: f83a999164 ("drm/amd/powerplay: add Vega10 powerplay support (v5)")
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-11-07 16:40:48 -05:00
..
acp drm: amd: remove broken include path 2017-03-14 19:19:44 -04:00
amdgpu drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition 2017-11-07 16:39:39 -05:00
amdkfd drm/amdkfd: Minor cleanups 2017-11-01 19:21:33 -04:00
include drm/amdgpu: add uvd enc registers in header 2017-10-06 17:43:53 -04:00
lib drm/amd/chash: Fix typo 2017-09-28 16:03:29 -04:00
powerplay drm/amd/powerplay: initialize a variable before using it 2017-11-07 16:40:48 -05:00
scheduler drm/amd/sched: fix job tear down order v2 2017-10-19 15:27:08 -04:00