aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4058-drm-amd-pp-Fix-NULL-point-check-error-in-smu_set_wat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4058-drm-amd-pp-Fix-NULL-point-check-error-in-smu_set_wat.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4058-drm-amd-pp-Fix-NULL-point-check-error-in-smu_set_wat.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4058-drm-amd-pp-Fix-NULL-point-check-error-in-smu_set_wat.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4058-drm-amd-pp-Fix-NULL-point-check-error-in-smu_set_wat.patch
new file mode 100644
index 00000000..87edbafe
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/4058-drm-amd-pp-Fix-NULL-point-check-error-in-smu_set_wat.patch
@@ -0,0 +1,31 @@
+From 3e85c9f743ff3c0b3f9115d005177838071cfcf6 Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Thu, 19 Apr 2018 12:40:15 +0800
+Subject: [PATCH 4058/4131] drm/amd/pp: Fix NULL point check error in
+ smu_set_watermarks_for_clocks_ranges
+
+It is caused by
+'commit d6c9a7dc86cd ("drm/amd/pp: Move common code to smu_helper.c")'
+
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c
+index 7c23741..93a3d02 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu_helper.c
+@@ -657,7 +657,7 @@ int smu_set_watermarks_for_clocks_ranges(void *wt_table,
+ uint32_t i;
+ struct watermarks *table = wt_table;
+
+- if (!table || wm_with_clock_ranges)
++ if (!table || !wm_with_clock_ranges)
+ return -EINVAL;
+
+ if (wm_with_clock_ranges->num_wm_sets_dmif > 4 || wm_with_clock_ranges->num_wm_sets_mcif > 4)
+--
+2.7.4
+