summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/stm/ltdc.c
diff options
context:
space:
mode:
authorRaphael Gallais-Pou <raphael.gallais-pou@foss.st.com>2021-09-07 17:13:23 +0200
committerPhilippe Cornu <philippe.cornu@foss.st.com>2021-09-09 14:54:59 +0200
commitee2cda7b027753fde555eae91e0f6de7f8c3ea7d (patch)
tree5bfb1b96c5a861ca9d14480db4d31e4313ce988c /drivers/gpu/drm/stm/ltdc.c
parent361da7c34216382b7329521c397db0e3e8f6e02b (diff)
downloadlinux-stable-ee2cda7b027753fde555eae91e0f6de7f8c3ea7d.tar.gz
linux-stable-ee2cda7b027753fde555eae91e0f6de7f8c3ea7d.tar.bz2
linux-stable-ee2cda7b027753fde555eae91e0f6de7f8c3ea7d.zip
drm/stm: ltdc: attach immutable zpos property to planes
Defines plane ordering by hard-coding an immutable Z position from the first plane, used as primary layer, to the next ones as overlay in order of instantiation. This zpos is only an information as it is not possible to modify it, blending operations are still applied from the top to the bottom layer. This patch helps to remove a warning message from the Android Hardware Composer. 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/20210907151323.5850-1-raphael.gallais-pou@foss.st.com
Diffstat (limited to 'drivers/gpu/drm/stm/ltdc.c')
-rw-r--r--drivers/gpu/drm/stm/ltdc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 195de30eb90c..bd603ef5e935 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1024,6 +1024,8 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc)
return -EINVAL;
}
+ drm_plane_create_zpos_immutable_property(primary, 0);
+
ret = drm_crtc_init_with_planes(ddev, crtc, primary, NULL,
&ltdc_crtc_funcs, NULL);
if (ret) {
@@ -1046,6 +1048,7 @@ static int ltdc_crtc_init(struct drm_device *ddev, struct drm_crtc *crtc)
DRM_ERROR("Can not create overlay plane %d\n", i);
goto cleanup;
}
+ drm_plane_create_zpos_immutable_property(overlay, i);
}
return 0;