From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41384197A92; Thu, 5 Sep 2024 10:01:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725530471; cv=none; b=GSl7ezaeE5eEM/sCh155l3DtkwDJvJlauyK3ILgTvLXtyYQ5Hn6w1EET5gq8kzZJHHxoGOQSrxAuzpYIcy1eKL5dRWOCXzZMZlUT9A8R7upN/666WUyBL252+/PYiyD89jdr/ff2NJFBUF4KW/4UsNzJb0KlSPa+PA90Gily6y4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725530471; c=relaxed/simple; bh=V9EnYM7UkZsxi0OAbCLbjlnme9v42l9cenCvBKvunJo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LpsYnLCr8fIhMpftNDkcV/31Wg1PwIAndpuqcAL8hhG8roXAkcbQOYPUIurApb34UemCP9CXOjD3lq2QqhKQth54z2Gr6YbKk6Eryaq3LGf8qBW+SYMl49t7a9FzhJ04B5O0J8pfZdm1CuNNHMG9YwQNzRcGtQ1gMkTU2zcBkxc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DqIpGB4C; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DqIpGB4C" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5D54C4CEC3; Thu, 5 Sep 2024 10:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725530471; bh=V9EnYM7UkZsxi0OAbCLbjlnme9v42l9cenCvBKvunJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DqIpGB4C1cd0X0bSNwFTRclYb7+2Ug8uGBq+pZqYXVUKtOah+YLqTe+5jYFSzdXCY 54e8YIGLdQBHOBR0FUSt9wObH37ff698N6pIdKa/WwdQD/TNtIGpq84ipO4k5OZlxe wTGnJKVB+HFcnOxMiViL0/fEicD3Rs23DU09bNpc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jesse Zhang , Tim Huang , Alex Deucher , Sasha Levin Subject: [PATCH 6.1 035/101] drm/amd/pm: fix warning using uninitialized value of max_vid_step Date: Thu, 5 Sep 2024 11:41:07 +0200 Message-ID: <20240905093717.500769882@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240905093716.075835938@linuxfoundation.org> References: <20240905093716.075835938@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jesse Zhang [ Upstream commit 17e3bea65cdc453695b2fe4ff26d25d17f5339e9 ] Check the return of pp_atomfwctrl_get_Voltage_table_v4 as it may fail to initialize max_vid_step V2: change the check condition (Tim Huang) Signed-off-by: Jesse Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c index f8333410cc3e..d2ecf0244fa5 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c @@ -2575,8 +2575,11 @@ static int vega10_init_smc_table(struct pp_hwmgr *hwmgr) } } - pp_atomfwctrl_get_voltage_table_v4(hwmgr, VOLTAGE_TYPE_VDDC, + result = pp_atomfwctrl_get_voltage_table_v4(hwmgr, VOLTAGE_TYPE_VDDC, VOLTAGE_OBJ_SVID2, &voltage_table); + PP_ASSERT_WITH_CODE(!result, + "Failed to get voltage table!", + return result); pp_table->MaxVidStep = voltage_table.max_vid_step; pp_table->GfxDpmVoltageMode = -- 2.43.0