Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The cursor plane's blend mode property advertises support for DRM_MODE_BLEND_PIXEL_NONE, but the driver never reads or implements this mode, causing it to incorrectly behave as DRM_MODE_BLEND_COVERAGE. --
commit 0fb989e37bfbacfc53639e07453dacd08e37bac4 Author: Huacai Chen <[email protected]> drm/loongson: Create blend mode property for cursor plane This commit fixes boot warnings by exposing a blend mode property for cursor planes that use pixel formats with alpha. It configures the planes to expose support for both DRM_MODE_BLEND_PIXEL_NONE and DRM_MODE_BLEND_COVERAGE. > diff --git a/drivers/gpu/drm/loongson/lsdc_plane.c > b/drivers/gpu/drm/loongson/lsdc_plane.c > index bea42215796d4..969b2aaa4fd09 100644 > --- a/drivers/gpu/drm/loongson/lsdc_plane.c > +++ b/drivers/gpu/drm/loongson/lsdc_plane.c [ ... ] > @@ -765,15 +767,16 @@ int ls7a1000_cursor_plane_init(struct drm_device *ddev, > > drm_plane_helper_add(plane, &ls7a1000_cursor_plane_helper_funcs); > > - return 0; > + return drm_plane_create_blend_mode_property(plane, blend_caps); > } [Severity: Medium] Does this driver actually support DRM_MODE_BLEND_PIXEL_NONE? The blend caps advertise DRM_MODE_BLEND_PIXEL_NONE, allowing userspace to request disabling alpha blending on the cursor plane. However, looking at the atomic update path for this hardware: ls7a1000_cursor_plane_atomic_update() { ... ops->update_cfg(cursor, CURSOR_SIZE_32X32, CURSOR_FORMAT_ARGB8888); ... } And similarly for the ls7a2000 hardware: ls7a2000_cursor_plane_atomic_update() { ... ops->update_cfg(cursor, cursor_size, CURSOR_FORMAT_ARGB8888); ... } It appears the hardware is unconditionally programmed to use alpha blending (CURSOR_FORMAT_ARGB8888) regardless of the plane_state->pixel_blend_mode value. If userspace sets the pixel blend mode to None, won't it silently continue using alpha coverage instead of rendering an opaque cursor? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
