提交 c20351ad 编写于 作者: R Raphael Gallais-Pou 提交者: Philippe Cornu

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: NRaphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Acked-by: NYannick Fertre <yannick.fertre@foss.st.com>
Reviewed-by: NYannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: NPhilippe Cornu <philippe.cornu@foss.st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210907151534.6013-1-raphael.gallais-pou@foss.st.com
上级 ee2cda7b
...@@ -845,7 +845,7 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane, ...@@ -845,7 +845,7 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,
LXCFBLR_CFBLL | LXCFBLR_CFBP, val); LXCFBLR_CFBLL | LXCFBLR_CFBP, val);
/* Specifies the constant alpha value */ /* Specifies the constant alpha value */
val = CONSTA_MAX; val = newstate->alpha >> 8;
reg_update_bits(ldev->regs, LTDC_L1CACR + lofs, LXCACR_CONSTA, val); reg_update_bits(ldev->regs, LTDC_L1CACR + lofs, LXCACR_CONSTA, val);
/* Specifies the blending factors */ /* Specifies the blending factors */
...@@ -997,6 +997,8 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev, ...@@ -997,6 +997,8 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev,
drm_plane_helper_add(plane, &ltdc_plane_helper_funcs); drm_plane_helper_add(plane, &ltdc_plane_helper_funcs);
drm_plane_create_alpha_property(plane);
DRM_DEBUG_DRIVER("plane:%d created\n", plane->base.id); DRM_DEBUG_DRIVER("plane:%d created\n", plane->base.id);
return plane; return plane;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册