The cursor blending mode was added twice because the same change was
applied by accident from different patches. Revert the second patch.

Reported-by: Marek Szyprowski <[email protected]>
Link: 
https://lore.kernel.org/dri-devel/[email protected]/
Fixes: 6947b78df4d2 ("drm/virtio: Add pixel blend mode property to cursor 
plane")
Signed-off-by: Dmitry Osipenko <[email protected]>
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c 
b/drivers/gpu/drm/virtio/virtgpu_plane.c
index b422eba42a5f..640815af4098 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -589,7 +589,6 @@ 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;
@@ -615,17 +614,5 @@ struct drm_plane *virtio_gpu_plane_init(struct 
virtio_gpu_device *vgdev,
                drm_plane_create_blend_mode_property(plane,
                                                     
BIT(DRM_MODE_BLEND_PREMULTI));
 
-       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;
 }
-- 
2.55.0


Reply via email to