This is a note to let you know that I've just added the patch titled drm/amd/display: Fix hang when skipping modeset to the 6.2-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-amd-display-fix-hang-when-skipping-modeset.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From da5e14909776edea4462672fb4a3007802d262e7 Mon Sep 17 00:00:00 2001 From: Aurabindo Pillai <aurabindo.pillai@xxxxxxx> Date: Fri, 24 Mar 2023 10:42:37 -0400 Subject: drm/amd/display: Fix hang when skipping modeset From: Aurabindo Pillai <aurabindo.pillai@xxxxxxx> 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 <Alvin.Lee2@xxxxxxx> Acked-by: Qingqing Zhuo <qingqing.zhuo@xxxxxxx> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@xxxxxxx> Tested-by: Daniel Wheeler <daniel.wheeler@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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 @@ -7783,6 +7783,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) { @@ -9330,8 +9332,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 @@ -1707,6 +1707,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]; Patches currently in stable-queue which might be from aurabindo.pillai@xxxxxxx are queue-6.2/drm-amd-display-do-not-clear-gpint-register-when-rel.patch queue-6.2/drm-amd-display-fix-hang-when-skipping-modeset.patch queue-6.2/drm-amd-display-reset-outbox0-r-w-pointer-on-dmub-re.patch queue-6.2/drm-amd-display-add-missing-wa-and-mclk-validation.patch queue-6.2/drm-amd-display-update-bounding-box-values-for-dcn32.patch queue-6.2/drm-amd-display-fixes-for-dcn32_clk_mgr-implementati.patch queue-6.2/drm-amd-display-return-error-code-on-dsc-atomic-chec.patch