Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2329CA5FC4 for ; Fri, 2 Oct 2026 10:26:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D997D10E375; Fri, 2 Oct 2026 10:26:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=dmitry.osipenko@collabora.com header.b="GQnxE8bO"; dkim-atps=neutral Received: from sender5-op-o11.zoho.com (sender5-op-o11.zoho.com [165.173.182.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2530410E375 for ; Fri, 2 Oct 2026 10:26:39 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1790936797; cv=none; d=zohomail.com; s=zohoarc; b=D3im91SJq5ZGscs2Smeb+uOrOJX+UttklDSNpfQ48AnDQZyGSIr3pvX8EZsNkbEx2JT+FDjZltUsBNyZZ1KrzP/FsBkiPaXRLBlsxydnqOPFDTYbA5UEGJWI/wmz/mjf/unS0/iiGHd8tJPekqRi+Dmj+rFBGEZOTY4jNxoho3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1790936797; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=WTa1Ybsrqm/t55pYEzCBO6zMyb2xeOEIRuOtsv1husQ=; b=JCQca65d3u996+sxNW2u7pazr+vBW9qRtVxJ6NMSEtcr0YP17x71KUUGRRPoY8unyie8P/8LM60cCovcL3iPkyf8jdBuMGv+JYfexe/iLV4GvshseSYXLbRAz/jPCmt2YJ7x054JBr8FtjDws85lgydn7brr2RJwUckGudEiHy0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=dmitry.osipenko@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1790936797; s=zohomail; d=collabora.com; i=dmitry.osipenko@collabora.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=WTa1Ybsrqm/t55pYEzCBO6zMyb2xeOEIRuOtsv1husQ=; b=GQnxE8bOT1RGx0TsVEGFsFtVPBms08WtJ8XXh8+PDlasZESRE7P0UikMzymc3utO VASqezhg1btvbmpALs1cu+rhKNg0J90YHkJbYr92Mrj/zuvFEE02l3Z6VqrCiPA1rge iwanfTNsPnArqJzFDwm9pvQbK0IAjR3fc48Pcd5A= Received: by smtp.zohomail.com with SMTPS id 1790936796927284.6379734282733; Fri, 2 Oct 2026 03:26:36 -0700 (PDT) Message-ID: Date: Fri, 2 Oct 2026 13:26:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/virtio: Add pixel blend mode property to cursor plane To: Marek Szyprowski , oushixiong1025@163.com, David Airlie Cc: Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Simona Vetter , dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, Shixiong Ou , Ye Liu References: <20260828090123.784944-1-oushixiong1025@163.com> Content-Language: en-US From: Dmitry Osipenko In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 10/1/26 21:00, Marek Szyprowski wrote: > On 20.09.2026 20:21, Dmitry Osipenko wrote: >> On 8/28/26 12:01, oushixiong1025@163.com wrote: >>> From: Shixiong Ou >>> >>> The cursor plane exposes a format with an alpha channel >>> (DRM_FORMAT_ARGB8888) without a pixel blend mode property. Since >>> commit 860e748bddcc ("drm: ensure blend mode supported if pixel >>> format with alpha exposed") this triggers a warning during >>> drm_mode_config_validate(): >>> >>> [ 0.649020] ------------[ cut here ]------------ >>> [ 0.649040] [PLANE:36:plane-1] pixel format with alpha exposed but blend mode not setup >>> [ 0.649081] WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate >>> ...... >>> [ 0.649761] Call trace: >>> [ 0.649764] drm_mode_config_validate+0x398/0x558 [drm] (P) >>> [ 0.649912] drm_dev_register+0x1cc/0x2a0 [drm] >>> [ 0.650058] virtio_gpu_probe+0xd4/0x1c0 [virtio_gpu] >>> [ 0.650088] virtio_dev_probe+0x1c8/0x310 >>> ...... >>> [ 0.650261] ---[ end trace 0000000000000000 ]--- >>> >>> >>> Create the property with the only supported blend mode, >>> DRM_MODE_BLEND_PREMULTI, which is also the property's default and >>> matches what userspace had to assume before the property existed. >>> >>> Reported-by: Ye Liu >>> Signed-off-by: Shixiong Ou >>> --- >>> drivers/gpu/drm/virtio/virtgpu_plane.c | 14 ++++++++++++++ >>> 1 file changed, 14 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c >>> index 1d1b27ece62a..11771c943ea6 100644 >>> --- a/drivers/gpu/drm/virtio/virtgpu_plane.c >>> +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c >>> @@ -24,6 +24,7 @@ >>> */ >>> >>> #include >>> +#include >>> #include >>> #include >>> #include >>> @@ -588,6 +589,7 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, >>> struct drm_plane *plane; >>> const uint32_t *formats; >>> int nformats; >>> + int ret; >>> >>> if (type == DRM_PLANE_TYPE_CURSOR) { >>> formats = virtio_gpu_cursor_formats; >>> @@ -610,5 +612,17 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, >>> if (type == DRM_PLANE_TYPE_PRIMARY) >>> drm_plane_enable_fb_damage_clips(plane); >>> >>> + if (type == DRM_PLANE_TYPE_CURSOR) { >>> + /* >>> + * The cursor plane exposes a format with an alpha channel, >>> + * which requires a blend mode property. The host blends >>> + * premultiplied alpha, matching the property's default. >>> + */ >>> + ret = drm_plane_create_blend_mode_property(plane, >>> + BIT(DRM_MODE_BLEND_PREMULTI)); >>> + if (ret) >>> + return ERR_PTR(ret); >>> + } >>> + >>> return plane; >>> } >> Applied to misc-fixes, thanks! > > > This duplicates commit f2e64f450c16 ("drm/virtio: create blend mode property on cursor > plane") merged a bit earlier, what in turn results in double call to > drm_plane_create_blend_mode_property() what confuses userspace (modetest tool crashes). Good catch, will revert this patch. Thanks! -- Best regards, Dmitry