From: Greg Kroah-Hartman Date: Mon, 12 Aug 2024 14:09:21 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v6.1.105~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d2f46aceb0309c5640ce966b3a5dd147ca08140;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches added patches: revert-drm-amd-display-add-null-check-for-afb-before-dereferencing-in-amdgpu_dm_plane_handle_cursor_update.patch revert-drm-amd-display-handle-hpd_irq-for-internal-link.patch --- diff --git a/queue-6.10/revert-drm-amd-display-add-null-check-for-afb-before-dereferencing-in-amdgpu_dm_plane_handle_cursor_update.patch b/queue-6.10/revert-drm-amd-display-add-null-check-for-afb-before-dereferencing-in-amdgpu_dm_plane_handle_cursor_update.patch new file mode 100644 index 00000000000..2642d070f53 --- /dev/null +++ b/queue-6.10/revert-drm-amd-display-add-null-check-for-afb-before-dereferencing-in-amdgpu_dm_plane_handle_cursor_update.patch @@ -0,0 +1,53 @@ +From 778e3979c5dc9cbdb5d1b92afed427de6bc483b4 Mon Sep 17 00:00:00 2001 +From: Ivan Lipski +Date: Fri, 7 Jun 2024 12:33:59 -0400 +Subject: Revert "drm/amd/display: Add NULL check for 'afb' before dereferencing in amdgpu_dm_plane_handle_cursor_update" + +From: Ivan Lipski + +commit 778e3979c5dc9cbdb5d1b92afed427de6bc483b4 upstream. + +[WHY] +This patch is a dupplicate implementation of 14bcf29b, which we +are reverting due to a regression with kms_plane_cursor IGT tests. + +This reverts commit 38e6f715b02b572f74677eb2f29d3b4bc6f1ddff. + +Reviewed-by: Srinivasan Shanmugam +Tested-by: George Zhang +Signed-off-by: Ivan Lipski +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +@@ -1231,22 +1231,14 @@ void amdgpu_dm_plane_handle_cursor_updat + { + struct amdgpu_device *adev = drm_to_adev(plane->dev); + struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(plane->state->fb); +- struct drm_crtc *crtc; +- struct dm_crtc_state *crtc_state; +- struct amdgpu_crtc *amdgpu_crtc; +- u64 address; ++ struct drm_crtc *crtc = afb ? plane->state->crtc : old_plane_state->crtc; ++ struct dm_crtc_state *crtc_state = crtc ? to_dm_crtc_state(crtc->state) : NULL; ++ struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); ++ uint64_t address = afb ? afb->address : 0; + struct dc_cursor_position position = {0}; + struct dc_cursor_attributes attributes; + int ret; + +- if (!afb) +- return; +- +- crtc = plane->state->crtc ? plane->state->crtc : old_plane_state->crtc; +- crtc_state = crtc ? to_dm_crtc_state(crtc->state) : NULL; +- amdgpu_crtc = to_amdgpu_crtc(crtc); +- address = afb->address; +- + if (!plane->state->fb && !old_plane_state->fb) + return; + diff --git a/queue-6.10/revert-drm-amd-display-handle-hpd_irq-for-internal-link.patch b/queue-6.10/revert-drm-amd-display-handle-hpd_irq-for-internal-link.patch new file mode 100644 index 00000000000..ec1a6e5c4fb --- /dev/null +++ b/queue-6.10/revert-drm-amd-display-handle-hpd_irq-for-internal-link.patch @@ -0,0 +1,86 @@ +From a2919b25778b7479e477cf49af8c680017eafc24 Mon Sep 17 00:00:00 2001 +From: Sung-huai Wang +Date: Fri, 31 May 2024 15:43:44 +0800 +Subject: Revert "drm/amd/display: Handle HPD_IRQ for internal link" + +From: Sung-huai Wang + +commit a2919b25778b7479e477cf49af8c680017eafc24 upstream. + +[How&Why] +This reverts commit 239b31bd5c3fef3698440bf6436b2068c6bb08a3. + +Due to the it effects Replay resync. + +Reviewed-by: Wenjing Liu +Acked-by: Zaeem Mohamed +Signed-off-by: Sung-huai Wang +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c | 24 +++------- + 1 file changed, 9 insertions(+), 15 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c ++++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c +@@ -373,7 +373,6 @@ bool dp_handle_hpd_rx_irq(struct dc_link + union device_service_irq device_service_clear = {0}; + enum dc_status result; + bool status = false; +- bool allow_active = false; + + if (out_link_loss) + *out_link_loss = false; +@@ -428,6 +427,12 @@ bool dp_handle_hpd_rx_irq(struct dc_link + return false; + } + ++ if (handle_hpd_irq_psr_sink(link)) ++ /* PSR-related error was detected and handled */ ++ return true; ++ ++ handle_hpd_irq_replay_sink(link); ++ + /* If PSR-related error handled, Main link may be off, + * so do not handle as a normal sink status change interrupt. + */ +@@ -449,8 +454,10 @@ bool dp_handle_hpd_rx_irq(struct dc_link + * If we got sink count changed it means + * Downstream port status changed, + * then DM should call DC to do the detection. ++ * NOTE: Do not handle link loss on eDP since it is internal link + */ +- if (dp_parse_link_loss_status( ++ if ((link->connector_signal != SIGNAL_TYPE_EDP) && ++ dp_parse_link_loss_status( + link, + &hpd_irq_dpcd_data)) { + /* Connectivity log: link loss */ +@@ -459,11 +466,6 @@ bool dp_handle_hpd_rx_irq(struct dc_link + sizeof(hpd_irq_dpcd_data), + "Status: "); + +- if (link->psr_settings.psr_feature_enabled) +- edp_set_psr_allow_active(link, &allow_active, true, false, NULL); +- else if (link->replay_settings.replay_allow_active) +- edp_set_replay_allow_active(link, &allow_active, true, false, NULL); +- + if (defer_handling && has_left_work) + *has_left_work = true; + else +@@ -476,14 +478,6 @@ bool dp_handle_hpd_rx_irq(struct dc_link + dp_trace_link_loss_increment(link); + } + +- if (*out_link_loss == false) { +- if (handle_hpd_irq_psr_sink(link)) +- /* PSR-related error was detected and handled */ +- return true; +- +- handle_hpd_irq_replay_sink(link); +- } +- + if (link->type == dc_connection_sst_branch && + hpd_irq_dpcd_data.bytes.sink_cnt.bits.SINK_COUNT + != link->dpcd_sink_count) diff --git a/queue-6.10/series b/queue-6.10/series index e800e63a9ca..ff0e2d1bf8f 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -248,3 +248,5 @@ drm-radeon-remove-__counted_by-from-statearray.states.patch mptcp-fully-established-after-add_addr-echo-on-mpj.patch mptcp-pm-deny-endp-with-signal-subflow-port.patch block-use-the-right-type-for-stub-rq_integrity_vec.patch +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