]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: Avoid updating surface with the same surface under MPO
authorWayne Lin <Wayne.Lin@amd.com>
Fri, 23 Jan 2026 06:47:01 +0000 (14:47 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:47 +0000 (07:20 -0500)
[ Upstream commit 1a38ded4bc8ac09fd029ec656b1e2c98cc0d238c ]

[Why & How]
Although it's dummy updates of surface update for committing stream
updates, we should not have dummy_updates[j].surface all indicating
to the same surface under multiple surfaces case. Otherwise,
copy_surface_update_to_plane() in update_planes_and_stream_state()
will update to the same surface only.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index b6eee94861477bc665e4031e14032c72940b7aa5..e84ec4365ca6be497384f7e0bf9f58699dbd0810 100644 (file)
@@ -10961,7 +10961,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
                        continue;
                }
                for (j = 0; j < status->plane_count; j++)
-                       dummy_updates[j].surface = status->plane_states[0];
+                       dummy_updates[j].surface = status->plane_states[j];
 
                sort(dummy_updates, status->plane_count,
                     sizeof(*dummy_updates), dm_plane_layer_index_cmp, NULL);