drm/i915/display: expose blend mode on alpha-capable planes

Since commit 860e748bdd ("drm: ensure blend mode supported if pixel
format with alpha exposed"), drm_mode_config_validate() warns when a
plane exposes an alpha pixel format but not the "pixel blend mode"
property. The cursor (ARGB8888, all platforms) and the VLV/CHV primary
and sprite planes trip this.

Userspace has historically assumed premultiplied blending when the
property is not attached, so it is safe to assume that planes that
did not expose the property already blended with fixed pre-multiplied
alpha in hardware. Therefore, expose a "pixel blend mode" property
advertising only DRM_MODE_BLEND_PREMULTI to match that assumption and
silence the warning. The cursor call is unconditional; the primary and
sprite calls are gated to VLV/CHV, the only platforms whose format lists
include alpha formats.

Assisted-by: Claude:claude-opus-4-8
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16623
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patch.msgid.link/20260715054221.451421-1-chaitanya.kumar.borah@intel.com
This commit is contained in:
Chaitanya Kumar Borah 2026-07-15 11:12:21 +05:30 committed by Ankit Nautiyal
parent 3d4d292970
commit 67e955e073
3 changed files with 11 additions and 0 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);