aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2160-drm-amd-powerplay-fix-copy-n-paste-error-on-vddci_bu.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2160-drm-amd-powerplay-fix-copy-n-paste-error-on-vddci_bu.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2160-drm-amd-powerplay-fix-copy-n-paste-error-on-vddci_bu.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2160-drm-amd-powerplay-fix-copy-n-paste-error-on-vddci_bu.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2160-drm-amd-powerplay-fix-copy-n-paste-error-on-vddci_bu.patch
new file mode 100644
index 00000000..aadc6c59
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2160-drm-amd-powerplay-fix-copy-n-paste-error-on-vddci_bu.patch
@@ -0,0 +1,36 @@
+From 69880053a2de5969730a022e4950f90ffe259b60 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Thu, 9 Nov 2017 11:35:00 +0000
+Subject: [PATCH 2160/4131] drm/amd/powerplay: fix copy-n-paste error on
+ vddci_buf index
+
+The index to vddci_buf is using profile->ucElbVDDC_Num rather
+than profile->ucElbVDDCI_Num; this looks like a copy-n-paste
+error from previous code for the vddc_buf array and I'm pretty
+sure this is incorrect. Fix this by using the correct variable.
+
+Detected by CoverityScan, CID#1457172 ("Copy-paste error")
+
+Fixes: 970d9804b00d ("drm/amd/powerplay: Add support functions for CI to ppatomctrl.c")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
+index a129bc5..c6febbf 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
+@@ -1486,7 +1486,7 @@ int atomctrl_get_leakage_vddc_base_on_leakage(struct pp_hwmgr *hwmgr,
+ if (vddci_id_buf[i] == virtual_voltage_id) {
+ for (j = 0; j < profile->ucLeakageBinNum; j++) {
+ if (efuse_voltage_id <= leakage_bin[j]) {
+- *vddci = vddci_buf[j * profile->ucElbVDDC_Num + i];
++ *vddci = vddci_buf[j * profile->ucElbVDDCI_Num + i];
+ break;
+ }
+ }
+--
+2.7.4
+