aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4558-drm-amdgpu-display-check-if-ppfuncs-exists-before-us.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4558-drm-amdgpu-display-check-if-ppfuncs-exists-before-us.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/4558-drm-amdgpu-display-check-if-ppfuncs-exists-before-us.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4558-drm-amdgpu-display-check-if-ppfuncs-exists-before-us.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4558-drm-amdgpu-display-check-if-ppfuncs-exists-before-us.patch
new file mode 100644
index 00000000..78a73dcc
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4558-drm-amdgpu-display-check-if-ppfuncs-exists-before-us.patch
@@ -0,0 +1,30 @@
+From 12ca0be853d9133fbcdd14bf973179e6b5c73b2e Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 30 May 2018 09:34:23 -0500
+Subject: [PATCH 4558/5725] drm/amdgpu/display: check if ppfuncs exists before
+ using it
+
+Fixes a crash on asics without powerplay yet (e.g., vega20).
+
+Reviewed-by: Rex Zhu<rezhu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
+index d5e6b45..5a33461 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
+@@ -343,7 +343,7 @@ bool dm_pp_get_clock_levels_by_type_with_latency(
+ struct pp_clock_levels_with_latency pp_clks = { 0 };
+ const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
+
+- if (!pp_funcs->get_clock_by_type_with_latency)
++ if (!pp_funcs || !pp_funcs->get_clock_by_type_with_latency)
+ return false;
+
+ if (pp_funcs->get_clock_by_type_with_latency(pp_handle,
+--
+2.7.4
+