mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	Dorinda Bassey <dbassey@redhat.com>,
	dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev
Cc: kraxel@redhat.com, airlied@redhat.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: Mon, 12 Oct 2026 01:10:44 +0300	[thread overview]
Message-ID: <d27374f9-d0ec-4637-a4b4-d5e6ce1922a1@collabora.com> (raw)
In-Reply-To: <067c22f6-206a-421f-8837-1f8a88f55299@suse.de>

On 10/1/26 16:31, Thomas Zimmermann wrote:
> Hi
> 
> Am 01.10.26 um 12:46 schrieb Dmitry Osipenko:
>> On 9/30/26 18:03, Thomas Zimmermann 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(+)
>> For primary plane, alpha channel often doesn't matter as primary has
>> fixed z=0 order and a usual alpha blending mode would account only
>> overlay's alpha channel. Many real hw drivers expose alpha-channel
>> formats for primary plane for compatibility with userspace, even though
>> for them the alpha has no meaning for the primary plane.
> 
> We decidedly do not offer formats that are not native to the hardware;
> except for adding XRGB888.
> 
> 
>>
>> QEMU is most popular VMM using virtio-gpu, but there are others. For a
>> stricter compatibility we can translate B8G8R8A8 to X8R8G8B8 for the
>> primary plane in the driver code, but I assume in practice it's very
>> unlike this will be necessary and we can always do it later on if will
>> be needed.
> 
> No in-kernel format conversion please; again except for adding XRGB8888.

Chances are low this may ever become necessary. Confirm glmark2-drm now
works with this change.

Applied to misc-next

-- 
Best regards,
Dmitry

  reply	other threads:[~2026-10-11 22:11 UTC|newest]

Thread overview: 6+ 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
2026-10-11 22:10       ` Dmitry Osipenko [this message]
     [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=d27374f9-d0ec-4637-a4b4-d5e6ce1922a1@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=airlied@redhat.com \
    --cc=dbassey@redhat.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=tzimmermann@suse.de \
    --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®