On 5/22/26 16:49, Ville Syrjala wrote:
> From: Ville Syrjälä <[email protected]>
> 
> Currently only SKL+ universal planes have the blend mode property.
> Assuming it now becomes mandatory for all planes that support
> alpha blending we need to add it to cursors on all platforms,
> and VLV/CHV primary/sprite planes.
> 
> TODO: For VLV/CHV primary/sprite planes we could fairly easily
> implement DRM_MODE_BLEND_PIXEL_NONE by remapping the A format
> to the corresponding X format, and on CHV pipe B (but not pipes
> A/C) we could probably even implement DRM_MODE_BLEND_COVERAGE.
> 
> Cc: Leandro Ribeiro <[email protected]>
> Signed-off-by: Ville Syrjälä <[email protected]>

Ack, looks good to me (with the caveat I'm not familiar with i915 codebase).

> ---
>  drivers/gpu/drm/i915/display/i9xx_plane.c   | 4 ++++
>  drivers/gpu/drm/i915/display/intel_cursor.c | 3 +++
>  drivers/gpu/drm/i915/display/intel_sprite.c | 4 ++++
>  3 files changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c 
> b/drivers/gpu/drm/i915/display/i9xx_plane.c
> index 70734d32a409..490908f59141 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> @@ -1108,6 +1108,10 @@ intel_primary_plane_create(struct intel_display 
> *display, enum pipe pipe)
>                                                  DRM_MODE_ROTATE_0,
>                                                  supported_rotations);
>  
> +     if (display->platform.valleyview || display->platform.cherryview)
> +             drm_plane_create_blend_mode_property(&plane->base,
> +                                                  
> BIT(DRM_MODE_BLEND_PREMULTI));
> +
>       zpos = 0;
>       drm_plane_create_zpos_immutable_property(&plane->base, zpos);
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c 
> b/drivers/gpu/drm/i915/display/intel_cursor.c
> index 52347668f27d..344cee13ea97 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -1078,6 +1078,9 @@ intel_cursor_plane_create(struct intel_display *display,
>  
>       intel_cursor_add_size_hints_property(cursor);
>  
> +     drm_plane_create_blend_mode_property(&cursor->base,
> +                                          BIT(DRM_MODE_BLEND_PREMULTI));
> +
>       zpos = DISPLAY_RUNTIME_INFO(display)->num_sprites[pipe] + 1;
>       drm_plane_create_zpos_immutable_property(&cursor->base, zpos);
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c 
> b/drivers/gpu/drm/i915/display/intel_sprite.c
> index 6a65f92e8a03..3e38960bbbd8 100644
> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> @@ -1722,6 +1722,10 @@ intel_sprite_plane_create(struct intel_display 
> *display,
>                                         DRM_COLOR_YCBCR_BT709,
>                                         DRM_COLOR_YCBCR_LIMITED_RANGE);
>  
> +     if (display->platform.valleyview || display->platform.cherryview)
> +             drm_plane_create_blend_mode_property(&plane->base,
> +                                                  
> BIT(DRM_MODE_BLEND_PREMULTI));
> +
>       zpos = sprite + 1;
>       drm_plane_create_zpos_immutable_property(&plane->base, zpos);
>  

Reply via email to