Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] Retaining damage clips during modesets causes drivers that directly 
access damage clips to incorrectly perform partial screen updates instead of 
full screen updates.
--

commit 36f89d2b464094389bd2dab30c24b79223ef7bd1
Author: Thomas Zimmermann <[email protected]>

drm/damage-helper: Do not alter damage clips on modeset, but ignore them

This commit modifies the plane damage check to retain damage clips during
a full modeset. Instead of explicitly clearing the clips, it sets a new
ignore_damage_clips flag which is then checked by the damage iterator.

> diff --git a/drivers/gpu/drm/drm_damage_helper.c 
> b/drivers/gpu/drm/drm_damage_helper.c
> --- a/drivers/gpu/drm/drm_damage_helper.c
> +++ b/drivers/gpu/drm/drm_damage_helper.c
> @@ -78,10 +78,8 @@ void drm_atomic_helper_check_plane_damage(struct 
> drm_atomic_commit *state,
>               if (WARN_ON(!crtc_state))
>                       return;
>  
> -             if (drm_atomic_crtc_needs_modeset(crtc_state)) {
> -                     drm_property_blob_put(plane_state->fb_damage_clips);
> -                     plane_state->fb_damage_clips = NULL;
> -             }
> +             if (drm_atomic_crtc_needs_modeset(crtc_state))
> +                     plane_state->ignore_damage_clips = true;
>       }
>  }

[Severity: High]
By no longer setting plane_state->fb_damage_clips to NULL during a modeset,
will this break drivers that bypass the damage iterator?

Drivers like AMDGPU (in fill_dc_dirty_rects) and vmwgfx directly call
drm_plane_get_damage_clips_count() and drm_plane_get_damage_clips().
Because these accessor functions do not check the new ignore_damage_clips flag,
won't they see a non-zero clip count if userspace provided one?

If they see a non-zero clip count during a modeset, will they incorrectly
skip their fallback paths and perform a partial update instead of the
required full framebuffer update?

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to