dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] drm: create blend mode property on alpha-capable planes of simple drivers
@ 2026-09-01  8:32 Qinyun Tan
  2026-09-01  8:32 ` [PATCH v2 1/4] drm/ast: create blend mode property on cursor plane Qinyun Tan
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Qinyun Tan @ 2026-09-01  8:32 UTC (permalink / raw)
  To: dri-devel
  Cc: tzimmermann, airlied, jfalempe, kraxel, dmitry.osipenko, hansg,
	maarten.lankhorst, mripard, simona, leandro.ribeiro, daniels,
	pekka.paalanen, virtualization, spice-devel, linux-kernel,
	Qinyun Tan

Since commit 860e748bddcc ("drm: ensure blend mode supported if pixel
format with alpha exposed"), drm_mode_config_validate() warns when a
plane exposes an alpha pixel format but does not create the "pixel
blend mode" property. Several simple/virtual drivers trip this on
driver load. I hit the ast one on an ASPEED AST2600 BMC:

  [PLANE:37:plane-1] pixel format with alpha exposed but blend mode not setup
  WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate+0x48f/0x510 [drm]
  ...
  Call Trace:
   drm_dev_register+0x1ce/0x290 [drm]
   ast_pci_probe+0x19d/0x3f0 [ast]
   local_pci_probe+0x41/0x90

These four drivers share the same gap; this series covers ast, qxl,
virtio-gpu and vboxvideo. Each patch creates the "pixel blend mode"
property advertising the single blend mode the device actually
implements, based on the following:

  - ast: the hardware cursor blends with straight alpha per the
    ASPEED documentation (thanks Thomas), i.e. COVERAGE.
  - qxl: the SPICE protocol explicitly defines the ALPHA cursor type
    as a "pre-multiplied ARGB8888 pixmap" [1], i.e. PREMULTI.
  - virtio-gpu: the virtio spec does not define cursor alpha
    semantics; the host forwards the pixels verbatim and the remote
    cursor protocols among its frontends (SPICE alpha cursors, the
    VNC "Cursor With Alpha" encoding) define pre-multiplied alpha,
    i.e. PREMULTI.
  - vboxvideo: the host frontend loads the pointer shape verbatim
    into an unpremultiplied ARGB image (QImage::Format_ARGB32) before
    handing it to the host cursor APIs, i.e. COVERAGE.

This follows the same approach as the already-merged i915 and nouveau
fixes:

  67e955e073c6 ("drm/i915/display: expose blend mode on alpha-capable planes")
  df0311845915 ("drm/nouveau/kms/nv50-: Unconditionally create blend_mode prop for wndws")

The ast patch is verified on AST2600 hardware: the warning is gone
and the cursor plane exposes the "pixel blend mode" property. The
qxl, virtio and vboxvideo patches follow the identical pattern and
are compile-tested.

[1] https://www.spice-space.org/spice-protocol.html
    ("Cursor channel definition" section)

v2:
  - ast: advertise DRM_MODE_BLEND_COVERAGE instead of PREMULTI, per
    Thomas Zimmermann's review and the ASPEED documentation.
  - vboxvideo: advertise DRM_MODE_BLEND_COVERAGE instead of PREMULTI
    after checking how the VirtualBox host composites the pointer
    shape.
  - qxl, virtio: code unchanged; commit messages now cite the
    protocol-level justification for PREMULTI.

Qinyun Tan (4):
  drm/ast: create blend mode property on cursor plane
  drm/qxl: create blend mode property on primary and cursor planes
  drm/virtio: create blend mode property on cursor plane
  drm/vboxvideo: create blend mode property on planes

 drivers/gpu/drm/ast/ast_cursor.c       | 3 +++
 drivers/gpu/drm/qxl/qxl_display.c      | 4 ++++
 drivers/gpu/drm/vboxvideo/vbox_mode.c  | 4 ++++
 drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
 4 files changed, 15 insertions(+)

-- 
2.43.7


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-09-04  7:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01  8:32 [PATCH v2 0/4] drm: create blend mode property on alpha-capable planes of simple drivers Qinyun Tan
2026-09-01  8:32 ` [PATCH v2 1/4] drm/ast: create blend mode property on cursor plane Qinyun Tan
2026-09-01  8:46   ` sashiko-bot
2026-09-01 11:54   ` Thomas Zimmermann
2026-09-01 12:30     ` Thomas Zimmermann
2026-09-01 12:51       ` Qinyun Tan
2026-09-03  7:05         ` Thomas Zimmermann
2026-09-04  5:31           ` Qinyun Tan
2026-09-03  7:01   ` Thomas Zimmermann
2026-09-01  8:32 ` [PATCH v2 2/4] drm/qxl: create blend mode property on primary and cursor planes Qinyun Tan
2026-09-01 11:45   ` Thomas Zimmermann
2026-09-01  8:32 ` [PATCH v2 3/4] drm/virtio: create blend mode property on cursor plane Qinyun Tan
2026-09-01 11:46   ` Thomas Zimmermann
2026-09-01  8:32 ` [PATCH v2 4/4] drm/vboxvideo: create blend mode property on planes Qinyun Tan
2026-09-01  8:46   ` sashiko-bot
2026-09-03  7:00   ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox