aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1557-drm-amd-powerplay-fix-pcie-sysfs-interface-when-set-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1557-drm-amd-powerplay-fix-pcie-sysfs-interface-when-set-.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1557-drm-amd-powerplay-fix-pcie-sysfs-interface-when-set-.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1557-drm-amd-powerplay-fix-pcie-sysfs-interface-when-set-.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1557-drm-amd-powerplay-fix-pcie-sysfs-interface-when-set-.patch
new file mode 100644
index 00000000..972f49a0
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1557-drm-amd-powerplay-fix-pcie-sysfs-interface-when-set-.patch
@@ -0,0 +1,35 @@
+From cbcf879d296137a046997cd2274d238f9e4e7723 Mon Sep 17 00:00:00 2001
+From: Likun Gao <Likun.Gao@amd.com>
+Date: Mon, 4 Mar 2019 10:46:27 +0800
+Subject: [PATCH 1557/2940] drm/amd/powerplay: fix pcie sysfs interface when
+ set wrong value
+
+The operation of mutex_unlock smu->mutex should be done when forced level is larger than NUM_LINK_LEVELS in the function of force_clk_levels.
+
+Reported-by: Julia Lawall <julia.lawall@lip6.fr>
+Signed-off-by: Likun Gao <Likun.Gao@amd.com>
+Reviewed-by: Huang Rui <ray.huang@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
+index c66ad3b223d3..b71ecbe66ab4 100644
+--- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
++++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
+@@ -1200,8 +1200,10 @@ static int vega20_force_clk_levels(struct smu_context *smu,
+
+ case PP_PCIE:
+ if (soft_min_level >= NUM_LINK_LEVELS ||
+- soft_max_level >= NUM_LINK_LEVELS)
+- return -EINVAL;
++ soft_max_level >= NUM_LINK_LEVELS) {
++ ret = -EINVAL;
++ break;
++ }
+
+ ret = smu_send_smc_msg_with_param(smu,
+ SMU_MSG_SetMinLinkDpmByIndex, soft_min_level);
+--
+2.17.1
+