Skip to contentSkip to conversation

drm/vmwgfx: Add blend mode property

PATCH In review Ian Forbes 2 participants 2 messages Sep 16 – Sep 17

Subsystems (3)
lore
Share & tools
lore

Ian Forbes

author
#0 lore raw

PATCH v2 1/1 drm/vmwgfx: Add blend mode property

This stops the log spamming introduced by the referenced fixes commit.

Fixes 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")

---

v2:
- Add DRM_MODE_BLEND_PREMULT to primary plane to fix IGT

 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +8 -0
index 1b407b61f683..31d3ee0825ca 100644
@@ -20,10 +20,18 @@
 #include <drm/drm_rect.h>
 #include <drm/drm_sysfs.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_blend.h>
 
 void vmw_du_init(struct vmw_display_unit *du)
 {
 	vmw_vkms_crtc_init(&du->crtc);
+	drm_plane_create_blend_mode_property(&du->primary,
+					     BIT(DRM_MODE_BLEND_PIXEL_NONE) |
+					     BIT(DRM_MODE_BLEND_PREMULTI));
+	// Check that the cursor plane was actually initialized
+	if (du->crtc.cursor == &du->cursor.base)
+		drm_plane_create_blend_mode_property(&du->cursor.base,
+						     BIT(DRM_MODE_BLEND_PREMULTI));
 }
 
 void vmw_du_cleanup(struct vmw_display_unit *du)
Signature · 1 line
2.55.0
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 37 lines · Ian Forbes

This stops the log spamming introduced by the referenced fixes commit.

Fixes 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")

---

v2:
- Add DRM_MODE_BLEND_PREMULT to primary plane to fix IGT

 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +8 -1
index 1b407b61f683..31d3ee0825ca 100644
@@ -20,10 +20,18 @@
 #include <drm/drm_rect.h>
 #include <drm/drm_sysfs.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_blend.h>
 
 void vmw_du_init(struct vmw_display_unit *du)
 {
        vmw_vkms_crtc_init(&du->crtc);
+       drm_plane_create_blend_mode_property(&du->primary,
+                                            BIT(DRM_MODE_BLEND_PIXEL_NONE) |
+                                            BIT(DRM_MODE_BLEND_PREMULTI));
+       // Check that the cursor plane was actually initialized
+       if (du->crtc.cursor == &du->cursor.base)
+               drm_plane_create_blend_mode_property(&du->cursor.base,
+                                                    BIT(DRM_MODE_BLEND_PREMULTI));
 }
 
 void vmw_du_cleanup(struct vmw_display_unit *du)
--
Quoted 2 lines

2.55.0

Looks good, thanks!

z