drm/atomic: Set plane-state pixel_blend_mode to default
Subsystems (2)
Thomas Zimmermann
maintainerPATCH 1/1 drm/atomic: Set plane-state pixel_blend_mode to default
Initialize the plane state's pixel_blend_mode value to the plane property's default value. Resolves an inconsistency on planes that do not support PREMULTI.
Signed-off-by Thomas Zimmermann <[email protected]>
Fixes 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")
Cc Leandro Ribeiro <[email protected]>
Cc Pekka Paalanen <[email protected]>
Cc Daniel Stone <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
---
It's not clear what Fixes should point to, so I picked the commit that introduced the stricter validation of the blend-mode property.
--- drivers/gpu/drm/drm_atomic_state_helper.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_state_helper.c +7 -1
@@ -278,7 +278,13 @@ void __drm_atomic_helper_plane_state_init(struct drm_plane_state *plane_state, plane_state->rotation =DRM_MODE_ROTATE_0 ; plane_state->alpha =DRM_BLEND_ALPHA_OPAQUE ; - plane_state->pixel_blend_mode =DRM_MODE_BLEND_PREMULTI ; + +if (plane->blend_mode_property) { +if (!drm_object_property_get_default_value (&plane->base, + plane->blend_mode_property, + &val)) + plane_state->pixel_blend_mode = val; + } if (plane->color_encoding_property) { if (!drm_object_property_get_default_value(&plane->base,
Signature · 1 line
2.55.0
Thomas Zimmermann
maintainerAm 01.09.26 um 14:25 schrieb Thomas Zimmermann:
Quoted 3 lines
Initialize the plane state's
pixel_blend_modevalue to the plane property's default value. Resolves an inconsistency on planes that do not support PREMULTI.
Never mind. It's a duplicate of
Quoted 35 lines
Signed-off-by Thomas Zimmermann <[email protected]>Fixes 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed")Cc Leandro Ribeiro <[email protected]>Cc Pekka Paalanen <[email protected]>Cc Daniel Stone <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc Maxime Ripard <[email protected]>Cc Thomas Zimmermann <[email protected]>---
It's not clear what Fixes should point to, so I picked the commit that introduced the stricter validation of the blend-mode property.--- drivers/gpu/drm/drm_atomic_state_helper.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_atomic_state_helper.c +7
-1@@ -278,7 +278,13 @@ void __drm_atomic_helper_plane_state_init(struct drm_plane_state *plane_state, plane_state->rotation =DRM_MODE_ROTATE_0 ; plane_state->alpha =DRM_BLEND_ALPHA_OPAQUE ; - plane_state->pixel_blend_mode =DRM_MODE_BLEND_PREMULTI ; + +if (plane->blend_mode_property) { +if (!drm_object_property_get_default_value (&plane->base, + plane->blend_mode_property, + &val)) + plane_state->pixel_blend_mode = val; + } if (plane->color_encoding_property) { if (!drm_object_property_get_default_value(&plane->base,
Signature · 6 lines
-- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)