aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4528-drm-amd-powerplay-return-errno-code-to-caller-when-e.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4528-drm-amd-powerplay-return-errno-code-to-caller-when-e.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4528-drm-amd-powerplay-return-errno-code-to-caller-when-e.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4528-drm-amd-powerplay-return-errno-code-to-caller-when-e.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4528-drm-amd-powerplay-return-errno-code-to-caller-when-e.patch
new file mode 100644
index 00000000..ce283ef4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4528-drm-amd-powerplay-return-errno-code-to-caller-when-e.patch
@@ -0,0 +1,43 @@
+From 3e7c55707c521fca516b611a8b862312e477cc69 Mon Sep 17 00:00:00 2001
+From: Chen Wandun <chenwandun@huawei.com>
+Date: Mon, 18 Nov 2019 16:03:34 +0800
+Subject: [PATCH 4528/4736] drm/amd/powerplay: return errno code to caller when
+ error occur
+
+return errno code to caller when error occur, and meanwhile
+remove gcc '-Wunused-but-set-variable' warning.
+
+drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In function vegam_populate_smc_boot_level:
+drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1364:6: warning: variable result set but not used [-Wunused-but-set-variable]
+
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Chen Wandun <chenwandun@huawei.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
+index 2068eb00d2f8..50896e9b2579 100644
+--- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
++++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
+@@ -1371,11 +1371,16 @@ static int vegam_populate_smc_boot_level(struct pp_hwmgr *hwmgr,
+ result = phm_find_boot_level(&(data->dpm_table.sclk_table),
+ data->vbios_boot_state.sclk_bootup_value,
+ (uint32_t *)&(table->GraphicsBootLevel));
++ if (result)
++ return result;
+
+ result = phm_find_boot_level(&(data->dpm_table.mclk_table),
+ data->vbios_boot_state.mclk_bootup_value,
+ (uint32_t *)&(table->MemoryBootLevel));
+
++ if (result)
++ return result;
++
+ table->BootVddc = data->vbios_boot_state.vddc_bootup_value *
+ VOLTAGE_SCALE;
+ table->BootVddci = data->vbios_boot_state.vddci_bootup_value *
+--
+2.17.1
+