Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e267364a authored by Kieran Bingham's avatar Kieran Bingham Committed by Alexandru Gheorghe
Browse files

drm/atomic: Initialise planes with opaque alpha values



Planes without an alpha property, using __drm_atomic_helper_plane_reset
will have their plane state alpha initialised as zero, which represents
a transparent alpha.

If this value is then used for the plane, it may not be visible by
default, and thus doesn't represent a good initialisation state.

Update the default state->alpha value to DRM_BLEND_ALPHA_OPAQUE
unconditionally when the plane is reset.

Signed-off-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180919155700.10342-2-kieran.bingham+renesas@ideasonboard.com
parent e5264c43
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -3569,9 +3569,7 @@ void __drm_atomic_helper_plane_reset(struct drm_plane *plane,
	state->plane = plane;
	state->rotation = DRM_MODE_ROTATE_0;

	/* Reset the alpha value to fully opaque if it matters */
	if (plane->alpha_property)
		state->alpha = plane->alpha_property->values[1];
	state->alpha = DRM_BLEND_ALPHA_OPAQUE;
	state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI;

	plane->state = state;