[PATCH] drm/vkms: Advertise PREMULTI blend mode

1 view
Skip to first unread message

Michail Tatas

unread,
4:42 AM (16 hours ago) 4:42 AM
to syzbot+6245cb...@syzkaller.appspotmail.com, syzkall...@googlegroups.com
#syz test

Since we only support pre-multiplied alpha blend mode,
advertise that, otherwise validate_blend_mode_for_alpha_formats()
will throw a WARN.

Signed-off-by: Michail Tatas <michai...@gmail.com>
---
drivers/gpu/drm/vkms/vkms_plane.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
index 68cb2a3335e6..5a875fc90dee 100644
--- a/drivers/gpu/drm/vkms/vkms_plane.c
+++ b/drivers/gpu/drm/vkms/vkms_plane.c
@@ -246,6 +246,12 @@ struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev,
DRM_COLOR_YCBCR_BT601,
DRM_COLOR_YCBCR_FULL_RANGE);

+ /* Since our composer only supports pre-multiplied alpha,
+ * advertise only the PREMULTI blend mode.
+ */
+ drm_plane_create_blend_mode_property(&plane->base,
+ BIT(DRM_MODE_BLEND_PREMULTI));
+
if (vkms_config_plane_get_default_pipeline(plane_cfg))
vkms_initialize_colorops(&plane->base);

--
2.43.0

Michail Tatas

unread,
4:42 AM (16 hours ago) 4:42 AM
to syzbot+2302c5...@syzkaller.appspotmail.com, syzkall...@googlegroups.com
#syz test

Since we only support pre-multiplied alpha blend mode,
advertise that.

Signed-off-by: Michail Tatas <michai...@gmail.com>
---
drivers/gpu/drm/vkms/vkms_plane.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
index 68cb2a3335e6..8c67511d6e8c 100644
--- a/drivers/gpu/drm/vkms/vkms_plane.c
+++ b/drivers/gpu/drm/vkms/vkms_plane.c
@@ -246,6 +246,13 @@ struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev,
DRM_COLOR_YCBCR_BT601,
DRM_COLOR_YCBCR_FULL_RANGE);

+ /*
+ * Since our composer only supports pre-multiplied alpha,
Reply all
Reply to author
Forward
0 new messages