From: Thomas Zimmermann <tzimmermann@suse.de>
To: Dorinda Bassey <dbassey@redhat.com>
Cc: dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev,
kraxel@redhat.com, airlied@redhat.com,
dmitry.osipenko@collabora.com, slp@redhat.com, mhrica@redhat.com,
gurchetansingh@chromium.org, mripard@kernel.org, simona@ffwll.ch,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/virtio: add ARGB8888 support for primary planes
Date: Thu, 1 Oct 2026 15:28:00 +0200 [thread overview]
Message-ID: <35bb93e1-3c26-4025-a714-9cbe66a0e483@suse.de> (raw)
In-Reply-To: <CACzuRywG=AcFkXp6vw4ExzBz1Z2SA=mr7oJBEKB3_zTnTMsh0w@mail.gmail.com>
Am 30.09.26 um 18:12 schrieb Dorinda Bassey:
> Hi Thomas,
>
> But does the host also support ARGB on the primary plane? We usually
> don't export formats that are not available in (virtual) hardware.
>
>
> If you're asking about the hypervisor side providing the Virtual GPU,
> Yes the host supports ARGB on primary plane. QEMU's virtio-gpu
Ok, thanks.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> supports this see qemu's include/hw/virtio/virtio-gpu-pixman.h:26
> libkrun's virtio-gpu includes `B8G8R8A8_UNORM` in its
> ResourceFormat enum and maps it to display backend formats.
> Virglrenderer, which vhost-device-gpu also uses, maps
> `GBM_FORMAT_ARGB8888` to `VIRGL_FORMAT_B8G8R8A8_UNORM`.
> Other VMMs I've tested also support this format.
>
> Also I see the cursor plane in the virtio-gpu driver already exposes
> `DRM_FORMAT_HOST_ARGB8888`, confirming existing ARGB support
> in backends. I tested this with the vhost-user-gpu backend from -
> https://github.com/rust-vmm/vhost-device/tree/main/vhost-device-gpu
> and the libkrun guest, glmark2-drm renders correctly with it.
>
> BR,
> Dorinda.
>
>
> On Wed, Sep 30, 2026 at 5:04 PM Thomas Zimmermann
> <tzimmermann@suse.de> wrote:
>
> Hi
>
> Am 30.09.26 um 15:27 schrieb Dorinda Bassey:
> > 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.
>
> But does the host also support ARGB on the primary plane? We usually
> don't export formats that are not available in (virtual) hardware.
>
> Best regards
> Thomas
>
> >
> > The virtio_gpu_translate_format() function already handles
> > ARGB8888 translation to VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM,
> > so this just exposes the existing capability to userspace.
> >
> > Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
> > ---
> > drivers/gpu/drm/virtio/virtgpu_plane.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c
> b/drivers/gpu/drm/virtio/virtgpu_plane.c
> > index b422eba42a5f..5f0bc1b1931b 100644
> > --- a/drivers/gpu/drm/virtio/virtgpu_plane.c
> > +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
> > @@ -37,6 +37,7 @@
> >
> > static const uint32_t virtio_gpu_formats[] = {
> > DRM_FORMAT_HOST_XRGB8888,
> > + DRM_FORMAT_HOST_ARGB8888,
> > };
> >
> > static const uint32_t virtio_gpu_cursor_formats[] = {
>
> --
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
> <http://www.suse.com>
> GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG
> Nürnberg)
>
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)
prev parent reply other threads:[~2026-10-01 13:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 13:27 Dorinda Bassey
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 [this message]
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=35bb93e1-3c26-4025-a714-9cbe66a0e483@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@redhat.com \
--cc=dbassey@redhat.com \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhrica@redhat.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=slp@redhat.com \
--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
all inboxes | Powered by JetHome®