Skip to content

Commit d701687

Browse files
lolzballsgregkh
authored andcommitted
drm/amd/display: Write to correct dirty_rect
commit 751281c upstream. When FB_DAMAGE_CLIPS are provided in a non-MPO scenario, the loop does not use the counter i. This causes the fill_dc_dity_rect() to always fill dirty_rects[0], causing graphical artifacts when a damage clip aware DRM client sends more than 1 damage clip. Instead, use the flip_addrs->dirty_rect_count which is incremented by fill_dc_dirty_rect() on a successful fill. Fixes: 30ebe41 ("drm/amd/display: add FB_DAMAGE_CLIPS support") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2453 Signed-off-by: Benjamin Cheng <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.1.x Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d58fb94 commit d701687

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5023,9 +5023,9 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,
50235023

50245024
for (; flip_addrs->dirty_rect_count < num_clips; clips++)
50255025
fill_dc_dirty_rect(new_plane_state->plane,
5026-
&dirty_rects[i], clips->x1,
5027-
clips->y1, clips->x2 - clips->x1,
5028-
clips->y2 - clips->y1,
5026+
&dirty_rects[flip_addrs->dirty_rect_count],
5027+
clips->x1, clips->y1,
5028+
clips->x2 - clips->x1, clips->y2 - clips->y1,
50295029
&flip_addrs->dirty_rect_count,
50305030
false);
50315031
return;

0 commit comments

Comments
 (0)