aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4203-drm-amd-display-add-NULL-checks-for-clock-manager-po.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4203-drm-amd-display-add-NULL-checks-for-clock-manager-po.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4203-drm-amd-display-add-NULL-checks-for-clock-manager-po.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4203-drm-amd-display-add-NULL-checks-for-clock-manager-po.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4203-drm-amd-display-add-NULL-checks-for-clock-manager-po.patch
new file mode 100644
index 00000000..08ee2dcb
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4203-drm-amd-display-add-NULL-checks-for-clock-manager-po.patch
@@ -0,0 +1,50 @@
+From a5c4f7383c296cbd8b46b997b5f10fcaa0d93f1c Mon Sep 17 00:00:00 2001
+From: Ahzo <Ahzo@tutanota.com>
+Date: Fri, 11 Oct 2019 19:55:03 +0200
+Subject: [PATCH 4203/4736] drm/amd/display: add NULL checks for clock manager
+ pointer
+
+This fixes kernel NULL pointer dereferences on shutdown:
+RIP: 0010:build_audio_output.isra.0+0x97/0x110 [amdgpu]
+RIP: 0010:enable_link_dp+0x186/0x300 [amdgpu]
+
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Ahzo <Ahzo@tutanota.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +-
+ drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+index 5474e2525e0c..5ce5db7818e4 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+@@ -1528,7 +1528,7 @@ static enum dc_status enable_link_dp(
+
+ pipe_ctx->stream_res.pix_clk_params.requested_sym_clk =
+ link_settings.link_rate * LINK_RATE_REF_FREQ_IN_KHZ;
+- if (!apply_seamless_boot_optimization)
++ if (state->clk_mgr && !apply_seamless_boot_optimization)
+ state->clk_mgr->funcs->update_clocks(state->clk_mgr, state, false);
+
+ dp_enable_link_phy(
+diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+index 27542c22fa55..d1e14393a0f0 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
++++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+@@ -1158,8 +1158,9 @@ static void build_audio_output(
+ }
+ }
+
+- if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT ||
+- pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) {
++ if (state->clk_mgr &&
++ (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT ||
++ pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)) {
+ audio_output->pll_info.dp_dto_source_clock_in_khz =
+ state->clk_mgr->funcs->get_dp_ref_clk_frequency(
+ state->clk_mgr);
+--
+2.17.1
+