From: Greg Kroah-Hartman Date: Mon, 15 May 2023 16:09:50 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.14.315~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=772a58ad33f197292cb86f9b4cc9964a1a09a34f;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: drm-amd-display-fix-hang-when-skipping-modeset.patch --- diff --git a/queue-5.4/drm-amd-display-fix-hang-when-skipping-modeset.patch b/queue-5.4/drm-amd-display-fix-hang-when-skipping-modeset.patch new file mode 100644 index 00000000000..1fbb51dbbed --- /dev/null +++ b/queue-5.4/drm-amd-display-fix-hang-when-skipping-modeset.patch @@ -0,0 +1,60 @@ +From da5e14909776edea4462672fb4a3007802d262e7 Mon Sep 17 00:00:00 2001 +From: Aurabindo Pillai +Date: Fri, 24 Mar 2023 10:42:37 -0400 +Subject: drm/amd/display: Fix hang when skipping modeset + +From: Aurabindo Pillai + +commit da5e14909776edea4462672fb4a3007802d262e7 upstream. + +[Why&How] + +When skipping full modeset since the only state change was a front porch +change, the DC commit sequence requires extra checks to handle non +existant plane states being asked to be removed from context. + +Reviewed-by: Alvin Lee +Acked-by: Qingqing Zhuo +Signed-off-by: Aurabindo Pillai +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 | 5 ++++- + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -5776,6 +5776,8 @@ static void amdgpu_dm_commit_planes(stru + continue; + + dc_plane = dm_new_plane_state->dc_state; ++ if (!dc_plane) ++ continue; + + bundle->surface_updates[planes_count].surface = dc_plane; + if (new_pcrtc_state->color_mgmt_changed) { +@@ -7029,8 +7031,9 @@ static int dm_update_plane_state(struct + return -EINVAL; + } + ++ if (dm_old_plane_state->dc_state) ++ dc_plane_state_release(dm_old_plane_state->dc_state); + +- dc_plane_state_release(dm_old_plane_state->dc_state); + dm_new_plane_state->dc_state = NULL; + + *lock_and_validation_needed = true; +--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +@@ -1315,6 +1315,9 @@ bool dc_remove_plane_from_context( + struct dc_stream_status *stream_status = NULL; + struct resource_pool *pool = dc->res_pool; + ++ if (!plane_state) ++ return true; ++ + for (i = 0; i < context->stream_count; i++) + if (context->streams[i] == stream) { + stream_status = &context->stream_status[i]; diff --git a/queue-5.4/series b/queue-5.4/series index 71a655fe4e7..333949c6c6b 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -279,3 +279,4 @@ firmware-raspberrypi-fix-possible-memory-leak-in-rpi_firmware_probe.patch drm-msm-adreno-fix-null-ptr-access-in-adreno_gpu_cleanup.patch drm-exynos-move-to-use-request_irq-by-irqf_no_autoen-flag.patch mm-page_alloc-fix-potential-deadlock-on-zonelist_update_seq-seqlock.patch +drm-amd-display-fix-hang-when-skipping-modeset.patch