The mode-setting pipeline can disabled damage clippings for a commit
by setting ignore_damage_clips in struct drm_plane_state. The commit
will then do a full display update.
Test the flag in the primary ldu plane's atomic_update and do a full
update if it has been set.
Commit 35ed38d58257 ("drm: Allow drivers to indicate the damage helpers
to ignore damage clips") introduced ignore_damage_clips to selectively
ignore damage clipping in certain framebuffer changes. Vmwgfx does not
do that, but DRM's damage iterator will soon rely on the flag. Therefore
supporting it here as well make sense for consistency.
Signed-off-by: Thomas Zimmermann <[email protected]>
Fixes: 35ed38d58257 ("drm: Allow drivers to indicate the damage helpers to
ignore damage clips")
Cc: Javier Martinez Canillas <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: Zack Rusin <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v6.8+
---
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index af3e32174563..40618759c940 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -342,10 +342,15 @@ vmw_ldu_primary_plane_atomic_update(struct drm_plane
*plane,
.x2 = vfb->base.width,
.y2 = vfb->base.height
};
- struct drm_mode_rect *damage_rects =
drm_plane_get_damage_clips(new_state);
- u32 rect_count = drm_plane_get_damage_clips_count(new_state);
+ struct drm_mode_rect *damage_rects = NULL;
+ u32 rect_count = 0;
int ret;
+ if (!new_state->ignore_damage_clips) {
+ damage_rects = drm_plane_get_damage_clips(new_state);
+ rect_count =
drm_plane_get_damage_clips_count(new_state);
+ }
+
if (!damage_rects) {
damage_rects = &fb_rect;
rect_count = 1;
--
2.54.0