From nobody Sat Sep 26 13:08:28 2026 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6CF6C33F5B6 for ; Tue, 1 Sep 2026 08:32:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.113 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788251571; cv=none; b=W/1j4VB1QLL578pwocz6Dl7+EbEYX7yH38GQCXI+51x2MIxeY2MMMD1q3Kr9Dojb2jLeGXSSOfpycPUm44iT2t8o/27eiQOorCTogyQUS5r9rp/hrkRVaItKad6+tcnK5M/4VLH8MQW5copvNi5/eSt743JxBlKK54zfgWePz4o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788251571; c=relaxed/simple; bh=QrArlJOpnn1l0C5EPuae51xLAMvuL3hdqe1yfReQiL8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pIjFNM8qa9wM1ZTzTWrivgg6e9TnS02Rdhr4cp6JzRtjYGp6jPGYOS5U+g+RTXFEuF2M+eO51wAksdKq4igyZiSZB/KKgK3BljhzZBDM2ygnDRO8KeZe2QLI2NkKYVNv1O9FUWcgA/gbgM6gOOA4pntDWWqpybR9nStkNXfkyGA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=gdhCKrKT; arc=none smtp.client-ip=115.124.30.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="gdhCKrKT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1788251567; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=dmsGvnFPGiJMko6TrciY1hQhSYuIL5q33C55EfI8xTo=; b=gdhCKrKTlLn8XpACMffzxzykaazJTdOXfyopQYG0ZFH1K/Gk13koFSpRRTQZd0lKH5mAEBOeC4NLGazbHwVcta98tP8bDlFK5DsHYPX03lx6aKRNtvg9zSw2XDC1bbKDd4tt1FvfV3f8jpsvubKLwLj4awygpzD44giKvvWuIMo= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037033178;MF=qinyuntan@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0XA5o3sc_1788251565; Received: from banye.tbsite.net(mailfrom:qinyuntan@linux.alibaba.com fp:SMTPD_---0XA5o3sc_1788251565 cluster:ay36) by smtp.aliyun-inc.com; Tue, 01 Sep 2026 16:32:46 +0800 From: Qinyun Tan To: dri-devel@lists.freedesktop.org Cc: tzimmermann@suse.de, airlied@redhat.com, jfalempe@redhat.com, kraxel@redhat.com, dmitry.osipenko@collabora.com, hansg@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, simona@ffwll.ch, leandro.ribeiro@collabora.com, daniels@collabora.com, pekka.paalanen@collabora.com, virtualization@lists.linux.dev, spice-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Qinyun Tan Subject: [PATCH v2 1/4] drm/ast: create blend mode property on cursor plane Date: Tue, 1 Sep 2026 16:32:31 +0800 Message-ID: <20260901083234.1828755-2-qinyuntan@linux.alibaba.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260901083234.1828755-1-qinyuntan@linux.alibaba.com> References: <20260901083234.1828755-1-qinyuntan@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 not the "pixel blend mode" property. The ast cursor plane (ARGB4444, ARGB8888) trips this on driver load: [PLANE:37:plane-1] pixel format with alpha exposed but blend mode not set= up WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validat= e+0x48f/0x510 [drm] ... Call Trace: drm_dev_register+0x1ce/0x290 [drm] ast_pci_probe+0x19d/0x3f0 [ast] local_pci_probe+0x41/0x90 Per Thomas Zimmermann's review, the ASPEED documentation describes the hardware cursor as blending with straight (non-pre-multiplied) alpha, which corresponds to DRM_MODE_BLEND_COVERAGE. Expose a "pixel blend mode" property advertising only DRM_MODE_BLEND_COVERAGE to make the hardware semantics explicit and silence the warning. Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with= alpha exposed") Suggested-by: Thomas Zimmermann Signed-off-by: Qinyun Tan Reviewed-by: Thomas Zimmermann Tested-by: Thomas Zimmermann --- v2: advertise DRM_MODE_BLEND_COVERAGE instead of PREMULTI, per Thomas Zimmermann's review and the ASPEED documentation. drivers/gpu/drm/ast/ast_cursor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/ast/ast_cursor.c b/drivers/gpu/drm/ast/ast_cur= sor.c index fd19c45f2abe2..690d4cd1db5ee 100644 --- a/drivers/gpu/drm/ast/ast_cursor.c +++ b/drivers/gpu/drm/ast/ast_cursor.c @@ -25,6 +25,7 @@ #include =20 #include +#include #include #include #include @@ -355,6 +356,8 @@ int ast_cursor_plane_init(struct ast_device *ast) } drm_plane_helper_add(cursor_plane, &ast_cursor_plane_helper_funcs); drm_plane_enable_fb_damage_clips(cursor_plane); + drm_plane_create_blend_mode_property(cursor_plane, + BIT(DRM_MODE_BLEND_COVERAGE)); =20 return 0; } --=20 2.43.7 From nobody Sat Sep 26 13:08:28 2026 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16491476CC1 for ; Tue, 1 Sep 2026 08:32:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.100 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788251579; cv=none; b=GG1Jz1r3614FC3svtlESF6ecH9x7o94ObPFy/oJvJ9c0l83FXCOExzwOoxIudGulJvmSLMuDKFkiHgKHtTSVl6Debqtu4l2PdpRmy175P4QlVmJk4bWkm6IQphUQIhPLAK4Cgj+GoImJi3EvegkExkaAgZddn6uEGRHFuKDAlW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788251579; c=relaxed/simple; bh=c7hLF8s75SQmy1mnFWEw16SZ5RYfB506Y1oqIjhsX68=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pnBeuJ/ELCfHiFGrK6PZ8B+be0EJtRKjSbCLEm6VnAp3GRX5ej5Ck6Fuw7ujwqTQ1FAZ23RH3FiDmersacFz8OwfAoQIVqHpo96qAh63rZXBvcz+BaL3CtaGKCy4hTI3ZnGqiK1769d1QIqPRKYH9BpILKf8BBhct5GpUszVDsA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=AVo9IXD/; arc=none smtp.client-ip=115.124.30.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="AVo9IXD/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1788251568; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=cVNdgupGJDSpCiWNjr1klyxvUhhBKQDFzP2h81TiiYQ=; b=AVo9IXD/DG3SUrMRU1IFmRkhDrr36uLcGHN2KbhH5zN08qCnIL6fRfXtIPZf7oH67AivH+G7lKAS2HXs0qTzBTegZRBlsnfI5qwU92gqUF6sJ41yRUYT+uIRTtTuPq+4GIJ+JnUHkpfSMkE/H0mptLwXG7OdILEgeIftnuGi9ko= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037026112;MF=qinyuntan@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0XA5o3t._1788251566; Received: from banye.tbsite.net(mailfrom:qinyuntan@linux.alibaba.com fp:SMTPD_---0XA5o3t._1788251566 cluster:ay36) by smtp.aliyun-inc.com; Tue, 01 Sep 2026 16:32:47 +0800 From: Qinyun Tan To: dri-devel@lists.freedesktop.org Cc: tzimmermann@suse.de, airlied@redhat.com, jfalempe@redhat.com, kraxel@redhat.com, dmitry.osipenko@collabora.com, hansg@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, simona@ffwll.ch, leandro.ribeiro@collabora.com, daniels@collabora.com, pekka.paalanen@collabora.com, virtualization@lists.linux.dev, spice-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Qinyun Tan Subject: [PATCH v2 2/4] drm/qxl: create blend mode property on primary and cursor planes Date: Tue, 1 Sep 2026 16:32:32 +0800 Message-ID: <20260901083234.1828755-3-qinyuntan@linux.alibaba.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260901083234.1828755-1-qinyuntan@linux.alibaba.com> References: <20260901083234.1828755-1-qinyuntan@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 not the "pixel blend mode" property. Both the qxl primary and cursor planes expose ARGB8888 and trip this on driver load. qxl submits cursors as SPICE_CURSOR_TYPE_ALPHA, which the SPICE protocol explicitly defines as a "pre-multiplied ARGB8888 pixmap" (Spice Protocol, "Cursor channel definition" section [1]). This matches the blend mode userspace has always assumed when the property is not attached. Expose a "pixel blend mode" property advertising only DRM_MODE_BLEND_PREMULTI to make these semantics explicit and silence the warning. The primary plane is the bottom-most plane so its blend mode has no visible effect; advertise the same value there for consistency. No functional change. [1] https://www.spice-space.org/spice-protocol.html Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with= alpha exposed") Signed-off-by: Qinyun Tan Reviewed-by: Thomas Zimmermann --- v2: no code change; cite the SPICE protocol definition of the ALPHA cursor type in the commit message. drivers/gpu/drm/qxl/qxl_display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_di= splay.c index 7f4178800afd7..0cd1456cca347 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -993,6 +994,9 @@ static struct drm_plane *qxl_create_plane(struct qxl_de= vice *qdev, =20 drm_plane_helper_add(plane, helper_funcs); =20 + drm_plane_create_blend_mode_property(plane, + BIT(DRM_MODE_BLEND_PREMULTI)); + return plane; =20 free_plane: --=20 2.43.7 From nobody Sat Sep 26 13:08:28 2026 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38D5D474255 for ; Tue, 1 Sep 2026 08:32:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788251574; cv=none; b=uraUros1iwOovelubzkwkixr5ZqxaFyjWT+SroARgve/s2/vQ9YPMCAcnJoSC1OytYrr+7ZZ3QcERmFPwcOBViZSoirhBl2G+CAUCOK0vOkS+yDHmLeKdaKBZh8I3M6s2lzNhP93fwv25s3fJJdxb9xbRt3EMD1BkNfLNf+ZiDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788251574; c=relaxed/simple; bh=9tgnLdYl3CaRQm0w+UFFTLyy6mC/kMsQ8XZUV4Tmk/8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K1dgBRgqkVgHGhTceQ22d0u/XhSmZhy18Hyzkj+396AYcbO0RBXhrXVlzTsaTrw+fIRw1tX2Y+rQz1FEy1ftQTpGzyg5Pm3AU8fQyx+E6JiZMl4SJuQxBfVCU/UG5blwY7084sNVOy3Sev76f9mpTpIFgjmtuchx5Jw3487efhM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=wBuGzghW; arc=none smtp.client-ip=115.124.30.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="wBuGzghW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1788251569; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=RNx/AB2rEnwXFgZop/G62OeBN0oID8kahxlVtyhWinw=; b=wBuGzghWxw+Z8/+X01lsT5vZmJTy+NRvWv40LrQO9BCtQB/4AlBlzIikJG8NtTDOj9eswYZuPdzRQFHZQcSG5xGqVVIKBIXP0N+VjI3kuE9tiKGsY8JdmHYa6WzUTgzRZjUFk6CBSDrtCbXIWoiyGaqrjk0N7Ts+FYeehp8/NuM= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R721e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=qinyuntan@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0XA5o3tj_1788251567; Received: from banye.tbsite.net(mailfrom:qinyuntan@linux.alibaba.com fp:SMTPD_---0XA5o3tj_1788251567 cluster:ay36) by smtp.aliyun-inc.com; Tue, 01 Sep 2026 16:32:48 +0800 From: Qinyun Tan To: dri-devel@lists.freedesktop.org Cc: tzimmermann@suse.de, airlied@redhat.com, jfalempe@redhat.com, kraxel@redhat.com, dmitry.osipenko@collabora.com, hansg@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, simona@ffwll.ch, leandro.ribeiro@collabora.com, daniels@collabora.com, pekka.paalanen@collabora.com, virtualization@lists.linux.dev, spice-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Qinyun Tan Subject: [PATCH v2 3/4] drm/virtio: create blend mode property on cursor plane Date: Tue, 1 Sep 2026 16:32:33 +0800 Message-ID: <20260901083234.1828755-4-qinyuntan@linux.alibaba.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260901083234.1828755-1-qinyuntan@linux.alibaba.com> References: <20260901083234.1828755-1-qinyuntan@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 not the "pixel blend mode" property. The virtio-gpu cursor plane (HOST_ARGB8888) trips this. The virtio-gpu specification does not define the cursor alpha semantics. The host forwards the cursor pixels verbatim to its display frontends, and the remote cursor protocols among them (SPICE alpha cursors, the VNC "Cursor With Alpha" encoding) both define pre-multiplied alpha, matching what userspace has always assumed when the property is not attached. Expose a "pixel blend mode" property advertising only DRM_MODE_BLEND_PREMULTI to make these semantics explicit and silence the warning. The primary plane only exposes HOST_XRGB8888, so the call is gated to the cursor. No functional change. Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with= alpha exposed") Signed-off-by: Qinyun Tan Reviewed-by: Thomas Zimmermann --- v2: no code change; explain the protocol-level justification for PREMULTI in the commit message. drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virti= o/virtgpu_plane.c index 1d1b27ece62a7..640815af40980 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -24,6 +24,7 @@ */ =20 #include +#include #include #include #include @@ -609,6 +610,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_g= pu_device *vgdev, =20 if (type =3D=3D DRM_PLANE_TYPE_PRIMARY) drm_plane_enable_fb_damage_clips(plane); + else if (type =3D=3D DRM_PLANE_TYPE_CURSOR) + drm_plane_create_blend_mode_property(plane, + BIT(DRM_MODE_BLEND_PREMULTI)); =20 return plane; } --=20 2.43.7 From nobody Sat Sep 26 13:08:28 2026 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 498494746D4 for ; Tue, 1 Sep 2026 08:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788251575; cv=none; b=aZJuwpVN5t9S/hPtrschJPHz9D8IZkhMwREpBpLMu/nNW6RqpWVpCUa8WQTr8AKE9GjhdXgHHQYxFyb5AbFv+7z5uKaQd3OD5fUb2bYmkq0J07AlkaNCqayI921JUULUglSIdXEp8F/Mv8Cd8rh2Yrff5WeB6WkptoaRXl3Yplw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788251575; c=relaxed/simple; bh=LSXZcRQz4fI8+KdMeWPEJ2c2P8ADoq1M6SFkGK8FbEk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rFwueO7j4/OUQhCZovCcHgDLEJ1/kuUZ9Fa8Mk+9Eyls+n8YRCJGA9VZmpDC5eMps90XVT4mbv+YWzPUAZ7ArEs17gPeOfStvB0K2J5wIDLACH+vMiVVLlFAwTzPPAia2spO0tVAu+jB6b1lItlHuoo4P2VmdQ6nL6DRiQlRKm4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=LI3P477H; arc=none smtp.client-ip=115.124.30.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="LI3P477H" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1788251570; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=fycY0Gzv+BVjtODlOSPp5qT0n0vx4mMiqOs7d20mfcw=; b=LI3P477HUl7puKRWttrtdzo1wI3JA66WLk4j0n1JP/6WYu/uaSoXTum4mwR1krAOE8VoSxe0x0k5SaGkXZoUVdd58dLWOHyEXID2K0pTbRPR/C+fXler8wPYEoEq+OqRq97QTKMRzRKl3NBiyfJ6u8JhmEbianWttP/VvuRCr04= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037009110;MF=qinyuntan@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0XA5o3uM_1788251569; Received: from banye.tbsite.net(mailfrom:qinyuntan@linux.alibaba.com fp:SMTPD_---0XA5o3uM_1788251569 cluster:ay36) by smtp.aliyun-inc.com; Tue, 01 Sep 2026 16:32:49 +0800 From: Qinyun Tan To: dri-devel@lists.freedesktop.org Cc: tzimmermann@suse.de, airlied@redhat.com, jfalempe@redhat.com, kraxel@redhat.com, dmitry.osipenko@collabora.com, hansg@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, simona@ffwll.ch, leandro.ribeiro@collabora.com, daniels@collabora.com, pekka.paalanen@collabora.com, virtualization@lists.linux.dev, spice-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Qinyun Tan Subject: [PATCH v2 4/4] drm/vboxvideo: create blend mode property on planes Date: Tue, 1 Sep 2026 16:32:34 +0800 Message-ID: <20260901083234.1828755-5-qinyuntan@linux.alibaba.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: <20260901083234.1828755-1-qinyuntan@linux.alibaba.com> References: <20260901083234.1828755-1-qinyuntan@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 not the "pixel blend mode" property. Both the vboxvideo primary and cursor planes expose ARGB8888 and trip this on driver load. VirtualBox draws the cursor through the host windowing system, which treats the guest-supplied pointer shape as straight (non-pre-multiplied) alpha: the host frontend loads the pixels verbatim into an unpremultiplied ARGB image before handing them to the host cursor APIs. This corresponds to DRM_MODE_BLEND_COVERAGE. Expose a "pixel blend mode" property advertising only DRM_MODE_BLEND_COVERAGE to make these semantics explicit and silence the warning. The primary plane's alpha channel is ignored by the host (opaque blit) and it is the bottom-most plane anyway; advertise the same value there for consistency. Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with= alpha exposed") Signed-off-by: Qinyun Tan Acked-by: Thomas Zimmermann --- v2: advertise DRM_MODE_BLEND_COVERAGE instead of PREMULTI after checking how the VirtualBox host composites the pointer shape. drivers/gpu/drm/vboxvideo/vbox_mode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/vboxvideo/vbox_mode.c b/drivers/gpu/drm/vboxvi= deo/vbox_mode.c index 8e4e5fc9d3c5a..3c41238a82685 100644 --- a/drivers/gpu/drm/vboxvideo/vbox_mode.c +++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c @@ -15,6 +15,7 @@ =20 #include #include +#include #include #include #include @@ -540,6 +541,9 @@ static struct drm_plane *vbox_create_plane(struct vbox_= private *vbox, =20 drm_plane_helper_add(plane, helper_funcs); =20 + drm_plane_create_blend_mode_property(plane, + BIT(DRM_MODE_BLEND_COVERAGE)); + return plane; =20 free_plane: --=20 2.43.7