diff options
author | Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> | 2018-09-19 18:56:58 +0300 |
---|---|---|
committer | Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> | 2018-09-20 15:55:01 +0300 |
commit | e267364a6e1be8cccb16cec5b695e038c81a81a1 (patch) | |
tree | 70cd19bc675097a9c2ac307cfe07108e0d2d40f6 /drivers/gpu/drm/drm_atomic_helper.c | |
parent | e5264c433c8094d1723a011e1749bafcdac61beb (diff) | |
download | linux-e267364a6e1be8cccb16cec5b695e038c81a81a1.tar.xz |
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: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180919155700.10342-2-kieran.bingham+renesas@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 3cf1aa132778..e49b22381048 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -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; |