From nobody Sat Sep 26 23:52:45 2026 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.5]) (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 07DAC184540 for ; Fri, 28 Aug 2026 09:02:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787907775; cv=none; b=czp3v8SaAPvb1eIzkUtbQZt7/l35729w0QWPYbeBcgl11xjs1Ga8yWRYxbAtbkB0iAajXowwzRz1gzKj7/HBKRZ9tLs7sHtU77T44proAzUlVN8omfI/NH8kTkAVlzCv95GFl+ZgfonR8yliKDscDvuiVp4X3uF8D0/RLLuexNg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787907775; c=relaxed/simple; bh=5L+8iMVNX6IQUUlsU3thAK9rhZX6D34E4mPEYocAmeg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=S4l4OPRNlm01FQgHFoSds+hK47tGNC2HsMjgcN4WIOf51cghHl1T1z9rQkrvaERwLU6cI2KdB4p0uoF48pNIx4mBo2FjmHY5mrP0OcuWmKUzgA/uSnWHoHdzMx2OkrmEqdCJHbFdEr2ab4YkzP/7/Ixn/yzE4ct5prV6mh1Vn98= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=DffHrHIo; arc=none smtp.client-ip=117.135.210.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="DffHrHIo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=ug CMS/t4pT54t04r48wccbBM2NCtY6+PmK6XmdHCxWk=; b=DffHrHIouN45sCIF7v h2MUlrcebTPVJwgwcZSh+29Os7TXCk2qZ4K3Dr2COLLe8eAd8qT0mqCOxYYsm2FE LxK3NDcDiRs1r9Lc7sRrTkoW8XPhIhx8IO6k8f38jJM5ixoDzhsp/7SMLffNhsBB LyZrpLRpzePklLrUjlmcWpD7U= Received: from localhost.localdomain (unknown []) by gzga-smtp-mtada-g1-4 (Coremail) with SMTP id _____wAnB+NlTpFqmR5iSg--.32532S2; Fri, 28 Aug 2026 17:01:27 +0800 (CST) From: oushixiong1025@163.com To: David Airlie Cc: Gerd Hoffmann , Dmitry Osipenko , 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 Subject: [PATCH] drm/virtio: Add pixel blend mode property to cursor plane Date: Fri, 28 Aug 2026 17:01:23 +0800 Message-Id: <20260828090123.784944-1-oushixiong1025@163.com> X-Mailer: git-send-email 2.25.1 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 X-CM-TRANSID: _____wAnB+NlTpFqmR5iSg--.32532S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxZF1UWry7WFyrurW3KFW5trb_yoW5GFWxpF 43CFZIyrWrArsrJayxtayj939Ivan3KF4xKry5Zwsagwn0kry7Ar15A34xurW7JrWUGw4f Jr1kuF1q9FZ8uw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jn2-5UUUUU= X-CM-SenderInfo: xrxvxxx0lr0wirqskqqrwthudrp/xtbC4QerumqRTmfkigAA3L Content-Type: text/plain; charset="utf-8" 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_c= onfig_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/virti= o/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 @@ */ =20 #include +#include #include #include #include @@ -588,6 +589,7 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_g= pu_device *vgdev, struct drm_plane *plane; const uint32_t *formats; int nformats; + int ret; =20 if (type =3D=3D DRM_PLANE_TYPE_CURSOR) { formats =3D virtio_gpu_cursor_formats; @@ -610,5 +612,17 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_= gpu_device *vgdev, if (type =3D=3D DRM_PLANE_TYPE_PRIMARY) drm_plane_enable_fb_damage_clips(plane); =20 + if (type =3D=3D 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 =3D drm_plane_create_blend_mode_property(plane, + BIT(DRM_MODE_BLEND_PREMULTI)); + if (ret) + return ERR_PTR(ret); + } + return plane; } --=20 2.25.1 No virus found Checked by Hillstone Network AntiVirus