mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
drm/amdgpu/pm: Fix uninitialized variable agc_btc_response
[ Upstream commit df4409d8a04dd39d7f2aa0c5f528a56b99eaaa13 ] Assign an default value to agc_btc_response in failed case Signed-off-by: Ma Jun <Jun.Ma2@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Yang Wang <kevinyang.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
81a1e5108a
commit
9dcbb3b3b0
@@ -2365,15 +2365,20 @@ static int vega10_acg_enable(struct pp_hwmgr *hwmgr)
|
|||||||
{
|
{
|
||||||
struct vega10_hwmgr *data = hwmgr->backend;
|
struct vega10_hwmgr *data = hwmgr->backend;
|
||||||
uint32_t agc_btc_response;
|
uint32_t agc_btc_response;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (data->smu_features[GNLD_ACG].supported) {
|
if (data->smu_features[GNLD_ACG].supported) {
|
||||||
if (0 == vega10_enable_smc_features(hwmgr, true,
|
if (0 == vega10_enable_smc_features(hwmgr, true,
|
||||||
data->smu_features[GNLD_DPM_PREFETCHER].smu_feature_bitmap))
|
data->smu_features[GNLD_DPM_PREFETCHER].smu_feature_bitmap))
|
||||||
data->smu_features[GNLD_DPM_PREFETCHER].enabled = true;
|
data->smu_features[GNLD_DPM_PREFETCHER].enabled = true;
|
||||||
|
|
||||||
smum_send_msg_to_smc(hwmgr, PPSMC_MSG_InitializeAcg, NULL);
|
ret = smum_send_msg_to_smc(hwmgr, PPSMC_MSG_InitializeAcg, NULL);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
smum_send_msg_to_smc(hwmgr, PPSMC_MSG_RunAcgBtc, &agc_btc_response);
|
ret = smum_send_msg_to_smc(hwmgr, PPSMC_MSG_RunAcgBtc, &agc_btc_response);
|
||||||
|
if (ret)
|
||||||
|
agc_btc_response = 0;
|
||||||
|
|
||||||
if (1 == agc_btc_response) {
|
if (1 == agc_btc_response) {
|
||||||
if (1 == data->acg_loop_state)
|
if (1 == data->acg_loop_state)
|
||||||
|
|||||||
Reference in New Issue
Block a user