From: Greg Kroah-Hartman Date: Mon, 12 Aug 2024 14:57:23 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v6.1.105~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b085f5182197a96d753729cb8177347d3bbf2f9;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches added patches: drm-amd-display-add-null-check-in-resource_log_pipe_topology_update.patch drm-amd-display-change-assr-disable-sequence.patch drm-amd-display-defer-handling-mst-up-request-in-resume.patch --- diff --git a/queue-6.10/drm-amd-display-add-null-check-in-resource_log_pipe_topology_update.patch b/queue-6.10/drm-amd-display-add-null-check-in-resource_log_pipe_topology_update.patch new file mode 100644 index 00000000000..593ba73e925 --- /dev/null +++ b/queue-6.10/drm-amd-display-add-null-check-in-resource_log_pipe_topology_update.patch @@ -0,0 +1,41 @@ +From 899d92fd26fe780aad711322aa671f68058207a6 Mon Sep 17 00:00:00 2001 +From: Natanel Roizenman +Date: Wed, 3 Apr 2024 16:52:48 -0400 +Subject: drm/amd/display: Add null check in resource_log_pipe_topology_update + +From: Natanel Roizenman + +commit 899d92fd26fe780aad711322aa671f68058207a6 upstream. + +[WHY] +When switching from "Extend" to "Second Display Only" we sometimes +call resource_get_otg_master_for_stream on a stream for the eDP, +which is disconnected. This leads to a null pointer dereference. + +[HOW] +Added a null check in dc_resource.c/resource_log_pipe_topology_update. + +CC: stable@vger.kernel.org +Reviewed-by: Nicholas Kazlauskas +Acked-by: Aurabindo Pillai +Signed-off-by: Natanel Roizenman +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +@@ -2267,6 +2267,10 @@ void resource_log_pipe_topology_update(s + + otg_master = resource_get_otg_master_for_stream( + &state->res_ctx, state->streams[stream_idx]); ++ ++ if (!otg_master) ++ continue; ++ + resource_log_pipe_for_stream(dc, state, otg_master, stream_idx); + } + if (state->phantom_stream_count > 0) { diff --git a/queue-6.10/drm-amd-display-change-assr-disable-sequence.patch b/queue-6.10/drm-amd-display-change-assr-disable-sequence.patch new file mode 100644 index 00000000000..106de694ad0 --- /dev/null +++ b/queue-6.10/drm-amd-display-change-assr-disable-sequence.patch @@ -0,0 +1,48 @@ +From 2d696cc837eaf5394d79bfd2b0b0483c4778aa83 Mon Sep 17 00:00:00 2001 +From: Swapnil Patel +Date: Thu, 18 Apr 2024 14:30:39 -0400 +Subject: drm/amd/display: Change ASSR disable sequence + +From: Swapnil Patel + +commit 2d696cc837eaf5394d79bfd2b0b0483c4778aa83 upstream. + +[Why] +Currently disabling ASSR before stream is disabled causes visible +display corruption. + +[How] +Move disable ASSR command to after stream has been disabled. + +Cc: Mario Limonciello +Cc: Alex Deucher +Cc: stable@vger.kernel.org +Reviewed-by: Wenjing Liu +Acked-by: Wayne Lin +Signed-off-by: Swapnil Patel +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c ++++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c +@@ -2313,8 +2313,6 @@ void link_set_dpms_off(struct pipe_ctx * + + dc->hwss.disable_audio_stream(pipe_ctx); + +- edp_set_panel_assr(link, pipe_ctx, &panel_mode_dp, false); +- + update_psp_stream_config(pipe_ctx, true); + dc->hwss.blank_stream(pipe_ctx); + +@@ -2368,6 +2366,7 @@ void link_set_dpms_off(struct pipe_ctx * + dc->hwss.disable_stream(pipe_ctx); + disable_link(pipe_ctx->stream->link, &pipe_ctx->link_res, pipe_ctx->stream->signal); + } ++ edp_set_panel_assr(link, pipe_ctx, &panel_mode_dp, false); + + if (pipe_ctx->stream->timing.flags.DSC) { + if (dc_is_dp_signal(pipe_ctx->stream->signal)) diff --git a/queue-6.10/drm-amd-display-defer-handling-mst-up-request-in-resume.patch b/queue-6.10/drm-amd-display-defer-handling-mst-up-request-in-resume.patch new file mode 100644 index 00000000000..a1553b0394a --- /dev/null +++ b/queue-6.10/drm-amd-display-defer-handling-mst-up-request-in-resume.patch @@ -0,0 +1,42 @@ +From 202dc359addab29451d3d18243c3d957da5392c8 Mon Sep 17 00:00:00 2001 +From: Wayne Lin +Date: Mon, 15 Apr 2024 14:04:00 +0800 +Subject: drm/amd/display: Defer handling mst up request in resume + +From: Wayne Lin + +commit 202dc359addab29451d3d18243c3d957da5392c8 upstream. + +[Why] +Like commit ec5fa9fcdeca ("drm/amd/display: Adjust the MST resume flow"), we +want to avoid handling mst topology changes before restoring the old state. +If we enable DP_UP_REQ_EN before calling drm_atomic_helper_resume(), have +changce to handle CSN event first and fire hotplug event before restoring the +cached state. + +[How] +Disable mst branch sending up request event before we restoring the cached state. +DP_UP_REQ_EN will be set later when we call drm_dp_mst_topology_mgr_resume(). + +Cc: Mario Limonciello +Cc: Alex Deucher +Cc: stable@vger.kernel.org +Reviewed-by: Hersen Wu +Signed-off-by: Wayne Lin +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -2418,7 +2418,6 @@ static void resume_mst_branch_status(str + + ret = drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, + DP_MST_EN | +- DP_UP_REQ_EN | + DP_UPSTREAM_IS_SRC); + if (ret < 0) { + drm_dbg_kms(mgr->dev, "mst write failed - undocked during suspend?\n"); diff --git a/queue-6.10/series b/queue-6.10/series index 6e924f8b68d..c0f8e1857dd 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -252,3 +252,6 @@ revert-drm-amd-display-handle-hpd_irq-for-internal-link.patch revert-drm-amd-display-add-null-check-for-afb-before-dereferencing-in-amdgpu_dm_plane_handle_cursor_update.patch btrfs-fix-corruption-after-buffer-fault-in-during-direct-io-append-write.patch idpf-fix-memleak-in-vport-interrupt-configuration.patch +drm-amd-display-add-null-check-in-resource_log_pipe_topology_update.patch +drm-amd-display-change-assr-disable-sequence.patch +drm-amd-display-defer-handling-mst-up-request-in-resume.patch