From e34bc5096ef2ea5ecc743c81e151e212ab76dbb7 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 9 Sep 2024 09:09:08 +0000 Subject: [PATCH] drm/amd/pm: fix uninitialized variable warnings for vangogh_ppt From Tim Huang 97667de35ba771ed50430c5541c217c035b37810 in linux-6.6.y/6.6.50 b2871de6961d24d421839fbfa4aa3008ec9170d5 in mainline linux --- sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c index de368ae96f9..c242656d16a 100644 --- a/sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +++ b/sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c @@ -1017,6 +1017,18 @@ static int vangogh_get_dpm_ultimate_freq(struct smu_context *smu, } } if (min) { + ret = vangogh_get_profiling_clk_mask(smu, + AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK, + NULL, + NULL, + &mclk_mask, + &fclk_mask, + &soc_mask); + if (ret) + goto failed; + + vclk_mask = dclk_mask = 0; + switch (clk_type) { case SMU_UCLK: case SMU_MCLK: @@ -2489,6 +2501,8 @@ static u32 vangogh_set_gfxoff_residency(struct smu_context *smu, bool start) ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_LogGfxOffResidency, start, &residency); + if (ret) + return ret; if (!start) adev->gfx.gfx_off_residency = residency; -- 2.20.1