All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lyude Paul" <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/virtio: Recalculate ignore_damage_clips on every update
Date: Thu, 03 Sep 2026 21:27:11 +0000	[thread overview]
Message-ID: <20260903212712.4BEBF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260903211914.1109100-3-lyude@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Preexisting bug in vmwgfx: Plane state duplication permanently preserves ignore_damage_clips, disabling partial updates.
--

commit 18671312bd2be6fe18c7092369d0bbfb67a39103
Author: Christian Hergert <christian@sourceandstack.com>

drm/virtio: Recalculate ignore_damage_clips on every update

Plane state duplication preserves ignore_damage_clips. Once fbdev sets
it for a dumb buffer, later updates using rendered resources continue to
ignore damage because the flag is never cleared.

Assign ignore_damage_clips on every atomic check so rendered resources
can use supplied damage after an earlier dumb-buffer update.

> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
> index d9579a4b4714c..95ec688690d3a 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_plane.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
> @@ -119,8 +119,8 @@ static int virtio_gpu_plane_atomic_check(struct drm_plane *plane,
>  	 * so preserve userspace's accumulated per-buffer damage for those.
>  	 */
>  	bo = gem_to_virtio_gpu_obj(new_plane_state->fb->obj[0]);
> -	if (old_plane_state->fb != new_plane_state->fb && bo->dumb)
> -		new_plane_state->ignore_damage_clips = true;
> +	new_plane_state->ignore_damage_clips =
> +		old_plane_state->fb != new_plane_state->fb && bo->dumb;

[Severity: High]
This is a pre-existing issue, but does the same problem exist in vmwgfx?

Looking at vmw_du_primary_plane_atomic_check() in
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:

	if (old_fb != new_fb)
		new_state->ignore_damage_clips = true;

When old_fb == new_fb, it fails to clear the flag.

Once the flag is set to true during a page flip, won't it remain permanently
true across future state duplications?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903211914.1109100-1-lyude@redhat.com?part=2

  reply	other threads:[~2026-09-03 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 21:15 [PATCH 0/2] drm/virtio: Damage clip fixes Lyude Paul
2026-09-03 21:15 ` [PATCH 1/2] drm/virtio: preserve damage clips for rendered resources Lyude Paul
2026-09-03 21:15 ` [PATCH 2/2] drm/virtio: Recalculate ignore_damage_clips on every update Lyude Paul
2026-09-03 21:27   ` sashiko-bot [this message]
2026-09-07 12:45 ` [PATCH 0/2] drm/virtio: Damage clip fixes Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260903212712.4BEBF1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lyude@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.