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 <[email protected]>

    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/[email protected]?part=1

Reply via email to