]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2024 14:57:23 +0000 (16:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2024 14:57:23 +0000 (16:57 +0200)
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

queue-6.10/drm-amd-display-add-null-check-in-resource_log_pipe_topology_update.patch [new file with mode: 0644]
queue-6.10/drm-amd-display-change-assr-disable-sequence.patch [new file with mode: 0644]
queue-6.10/drm-amd-display-defer-handling-mst-up-request-in-resume.patch [new file with mode: 0644]
queue-6.10/series

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 (file)
index 0000000..593ba73
--- /dev/null
@@ -0,0 +1,41 @@
+From 899d92fd26fe780aad711322aa671f68058207a6 Mon Sep 17 00:00:00 2001
+From: Natanel Roizenman <natanel.roizenman@amd.com>
+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 <natanel.roizenman@amd.com>
+
+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 <nicholas.kazlauskas@amd.com>
+Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
+Signed-off-by: Natanel Roizenman <natanel.roizenman@amd.com>
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..106de69
--- /dev/null
@@ -0,0 +1,48 @@
+From 2d696cc837eaf5394d79bfd2b0b0483c4778aa83 Mon Sep 17 00:00:00 2001
+From: Swapnil Patel <swapnil.patel@amd.com>
+Date: Thu, 18 Apr 2024 14:30:39 -0400
+Subject: drm/amd/display: Change ASSR disable sequence
+
+From: Swapnil Patel <swapnil.patel@amd.com>
+
+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 <mario.limonciello@amd.com>
+Cc: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
+Acked-by: Wayne Lin <wayne.lin@amd.com>
+Signed-off-by: Swapnil Patel <swapnil.patel@amd.com>
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..a1553b0
--- /dev/null
@@ -0,0 +1,42 @@
+From 202dc359addab29451d3d18243c3d957da5392c8 Mon Sep 17 00:00:00 2001
+From: Wayne Lin <wayne.lin@amd.com>
+Date: Mon, 15 Apr 2024 14:04:00 +0800
+Subject: drm/amd/display: Defer handling mst up request in resume
+
+From: Wayne Lin <wayne.lin@amd.com>
+
+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 <mario.limonciello@amd.com>
+Cc: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
+Signed-off-by: Wayne Lin <wayne.lin@amd.com>
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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");
index 6e924f8b68d3ed55134396e2fa02886dae0e9441..c0f8e1857ddb4ca0ea6b480cfe256f7006ff798e 100644 (file)
@@ -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