Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dorinda Bassey" <dbassey@redhat.com>
Cc: dri-devel@lists.freedesktop.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>,
	virtualization@lists.linux.dev
Subject: Re: [PATCH] drm/virtio: add ARGB8888 support for primary planes
Date: Wed, 30 Sep 2026 13:41:40 +0000	[thread overview]
Message-ID: <20260930134141.5AC0D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260930132707.500748-1-dbassey@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/virtio: missing blend mode property for primary planes with alpha format
--

commit 9355c68bd37dd7d0e90b6eec00d769a8fd8ff04f
Author: Dorinda Bassey <dbassey@redhat.com>

    drm/virtio: add ARGB8888 support for primary planes
    
    Add DRM_FORMAT_HOST_ARGB8888 to the list of supported formats for
    virtio-gpu primary planes. Without this, glmark2-drm fails at
    startup because it selects ARGB visual configs by default, which
    don't match the XRGB-only plane capabilities. This causes
    drmModeSetCrtc to fail with EINVAL.

> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
> index 10718bc736939..eef9ef42dffea 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_plane.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
> @@ -38,6 +38,7 @@
>  
>  static const uint32_t virtio_gpu_formats[] = {
>  	DRM_FORMAT_HOST_XRGB8888,
> +	DRM_FORMAT_HOST_ARGB8888,
>  };

[Severity: Medium]
Does adding ARGB8888 support here also require adding a blend mode property
for the primary plane?

Looking at virtio_gpu_plane_init() in drivers/gpu/drm/virtio/virtgpu_plane.c,
the blend mode property is currently only created for cursor planes:

	if (type == DRM_PLANE_TYPE_PRIMARY)
		drm_plane_enable_fb_damage_clips(plane);
	else if (type == DRM_PLANE_TYPE_CURSOR)
		drm_plane_create_blend_mode_property(plane,
						     BIT(DRM_MODE_BLEND_PREMULTI));

Since the primary plane now exposes a format with an alpha channel
(DRM_FORMAT_HOST_ARGB8888), userspace compositors (like Wayland/Mutter) will
expect a blend mode property.

When a DRM client queries the properties of the primary plane after the
driver exposes this format, the missing blend mode property may prevent
userspace from correctly discovering or configuring the blend state. This
can potentially lead to incorrect blending or fallback to software
composition.

Should the primary plane also be updated to create the blend mode property in
virtio_gpu_plane_init()?

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

  reply	other threads:[~2026-09-30 13:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 13:27 [PATCH] drm/virtio: add ARGB8888 support for primary planes Dorinda Bassey
2026-09-30 13:41 ` sashiko-bot [this message]
2026-09-30 15:03 ` Thomas Zimmermann
2026-10-01 10:46   ` Dmitry Osipenko
2026-10-01 13:31     ` Thomas Zimmermann
     [not found]   ` <CACzuRywG=AcFkXp6vw4ExzBz1Z2SA=mr7oJBEKB3_zTnTMsh0w@mail.gmail.com>
2026-10-01 13:28     ` Thomas Zimmermann

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=20260930134141.5AC0D1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dbassey@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eperezma@redhat.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox