Skip to contentSkip to conversation

Revert "drm/virtio: Add pixel blend mode property to cursor plane"

PATCH In review Dmitry Osipenko 3 participants 5 messages Oct 7 – Oct 11

Subsystems (4)
lore
Share & tools
lore

Dmitry Osipenko

author maintainer
#0 lore raw

PATCH 1/1 Revert "drm/virtio: Add pixel blend mode property to cursor plane"

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

Fixes 6947b78df4d2 ("drm/virtio: Add pixel blend mode property to cursor plane")
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -13
index b422eba42a5f..640815af4098 100644
@@ -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;
 }
Signature · 1 line
2.55.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

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

Fixes 6947b78df4d2 ("drm/virtio: Add pixel blend mode property to cursor plane")

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
author maintainer
#2 lore raw
In reply to Dmitry Osipenko
Quoted 31 lines · Dmitry Osipenko

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

Fixes 6947b78df4d2 ("drm/virtio: Add pixel blend mode property to cursor plane")
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -5
index b422eba42a5f..640815af4098 100644
@@ -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

drivers/gpu/drm/virtio/virtgpu_plane.c struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, · line 618

Quoted 10 lines
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -8
-		 * 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;
 }

Marek, could you please give your r-b?

Signature · 2 lines
Best regards,
Dmitry
Reviewed-by
#3 lore raw
Quoted 28 lines · Dmitry Osipenko
Quoted 27 lines · Dmitry Osipenko

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

Fixes 6947b78df4d2 ("drm/virtio: Add pixel blend mode property to cursor plane")
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -1
index b422eba42a5f..640815af4098 100644
@@ -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));
 
Quoted 15 lines
Quoted 4 lines
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -4
-	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

drivers/gpu/drm/virtio/virtgpu_plane.c struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, · line 618

Quoted 10 lines
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -8
-		 * 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;
 }

Marek, could you please give your r-b?

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
author maintainer Applied
#4 lore raw
Quoted 45 lines · Marek Szyprowski
Quoted 28 lines · Dmitry Osipenko
Quoted 27 lines · Dmitry Osipenko

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

Fixes 6947b78df4d2 ("drm/virtio: Add pixel blend mode property to cursor plane")
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -1
index b422eba42a5f..640815af4098 100644
@@ -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));
 
Quoted 15 lines
Quoted 4 lines
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -4
-	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

drivers/gpu/drm/virtio/virtgpu_plane.c struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, · line 618

Quoted 10 lines
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -8
-		 * 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;
 }

Marek, could you please give your r-b?

Quoted 1 line

Thanks, applied to misc-fixes

Signature · 2 lines
Best regards,
Dmitry