drm/amd/display: Write to correct dirty_rect
authorjsg <jsg@openbsd.org>
Fri, 4 Aug 2023 09:23:40 +0000 (09:23 +0000)
committerjsg <jsg@openbsd.org>
Fri, 4 Aug 2023 09:23:40 +0000 (09:23 +0000)
From Benjamin Cheng
d701687c898e5358f29ca11bccdfc8f54129e69c in linux-6.1.y/6.1.43
751281c55579f0cb0e56c9797d4663f689909681 in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 328111f..5acc0b4 100644 (file)
@@ -5025,9 +5025,9 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,
 
                for (; flip_addrs->dirty_rect_count < num_clips; clips++)
                        fill_dc_dirty_rect(new_plane_state->plane,
-                                          &dirty_rects[i], clips->x1,
-                                          clips->y1, clips->x2 - clips->x1,
-                                          clips->y2 - clips->y1,
+                                          &dirty_rects[flip_addrs->dirty_rect_count],
+                                          clips->x1, clips->y1,
+                                          clips->x2 - clips->x1, clips->y2 - clips->y1,
                                           &flip_addrs->dirty_rect_count,
                                           false);
                return;