Skip to content

Commit c20351a

Browse files
rgallaispouPhilippe Cornu
authored andcommitted
drm/stm: ltdc: add layer alpha support
Android Hardware Composer supports alpha values applied to layers. Enabling non-opaque layers for the STM CRTC could help offload GPU resources for screen composition. Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Acked-by: Yannick Fertre <yannick.fertre@foss.st.com> Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com> Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210907151534.6013-1-raphael.gallais-pou@foss.st.com
1 parent ee2cda7 commit c20351a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/gpu/drm/stm/ltdc.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,
845845
LXCFBLR_CFBLL | LXCFBLR_CFBP, val);
846846

847847
/* Specifies the constant alpha value */
848-
val = CONSTA_MAX;
848+
val = newstate->alpha >> 8;
849849
reg_update_bits(ldev->regs, LTDC_L1CACR + lofs, LXCACR_CONSTA, val);
850850

851851
/* Specifies the blending factors */
@@ -997,6 +997,8 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
997997

998998
drm_plane_helper_add(plane, &ltdc_plane_helper_funcs);
999999

1000+
drm_plane_create_alpha_property(plane);
1001+
10001002
DRM_DEBUG_DRIVER("plane:%d created\n", plane->base.id);
10011003

10021004
return plane;

0 commit comments

Comments
 (0)