Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Raphael Gallais-Pou and committed by
Philippe Cornu
c20351ad ee2cda7b

+3 -1
+3 -1
drivers/gpu/drm/stm/ltdc.c
··· 845 845 LXCFBLR_CFBLL | LXCFBLR_CFBP, val); 846 846 847 847 /* Specifies the constant alpha value */ 848 - val = CONSTA_MAX; 848 + val = newstate->alpha >> 8; 849 849 reg_update_bits(ldev->regs, LTDC_L1CACR + lofs, LXCACR_CONSTA, val); 850 850 851 851 /* Specifies the blending factors */ ··· 996 996 return NULL; 997 997 998 998 drm_plane_helper_add(plane, &ltdc_plane_helper_funcs); 999 + 1000 + drm_plane_create_alpha_property(plane); 999 1001 1000 1002 DRM_DEBUG_DRIVER("plane:%d created\n", plane->base.id); 1001 1003