diff options
author | Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> | 2021-09-07 17:15:34 +0200 |
---|---|---|
committer | Philippe Cornu <philippe.cornu@foss.st.com> | 2021-09-09 14:58:27 +0200 |
commit | c20351ad58c9d352cd73b4ae34ce582de424cb52 (patch) | |
tree | 7489dc445b982b2af60a403014c167b2af07c800 | |
parent | ee2cda7b027753fde555eae91e0f6de7f8c3ea7d (diff) | |
download | lwn-c20351ad58c9d352cd73b4ae34ce582de424cb52.tar.gz lwn-c20351ad58c9d352cd73b4ae34ce582de424cb52.zip |
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
-rw-r--r-- | drivers/gpu/drm/stm/ltdc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index bd603ef5e935..dbdee954692a 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -845,7 +845,7 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane, LXCFBLR_CFBLL | LXCFBLR_CFBP, val); /* Specifies the constant alpha value */ - val = CONSTA_MAX; + val = newstate->alpha >> 8; reg_update_bits(ldev->regs, LTDC_L1CACR + lofs, LXCACR_CONSTA, val); /* Specifies the blending factors */ @@ -997,6 +997,8 @@ static struct drm_plane *ltdc_plane_create(struct drm_device *ddev, drm_plane_helper_add(plane, <dc_plane_helper_funcs); + drm_plane_create_alpha_property(plane); + DRM_DEBUG_DRIVER("plane:%d created\n", plane->base.id); return plane; |