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

Configure Feed

Select the types of activity you want to include in your feed.

drm/imx: ipuv3-plane: support underlay plane

The IPUv3 overlay plane may be placed over or under the primary plane.

Set the zpos of the primary to an immutable position of 1 to have the
possibility to place the other plane underneath it.

Set the zpos of other planes (the overlay plane) to a mutable value
between 0 (the lowest possible value of a zpos) and directly above the
primary plane with the latter being the default.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://patch.msgid.link/20260219-drm-imx-underlay-plane-v2-2-26ef829c5483@pengutronix.de

authored by

Michael Tretter and committed by
Philipp Zabel
ecbcceea a872e90e

+9 -10
+9 -10
drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c
··· 890 890 { 891 891 struct ipu_plane *ipu_plane; 892 892 const uint64_t *modifiers = ipu_format_modifiers; 893 - unsigned int zpos = (type == DRM_PLANE_TYPE_PRIMARY) ? 0 : 1; 893 + unsigned int primary_zpos = 1; 894 894 unsigned int format_count; 895 895 const uint32_t *formats; 896 896 int ret; ··· 923 923 ipu_plane->dma = dma; 924 924 ipu_plane->dp_flow = dp; 925 925 926 - if (type == DRM_PLANE_TYPE_PRIMARY) 926 + if (type == DRM_PLANE_TYPE_PRIMARY) { 927 927 drm_plane_helper_add(&ipu_plane->base, &ipu_primary_plane_helper_funcs); 928 - else 929 - drm_plane_helper_add(&ipu_plane->base, &ipu_plane_helper_funcs); 930 - 931 - if (dp == IPU_DP_FLOW_SYNC_BG || dp == IPU_DP_FLOW_SYNC_FG) 932 - ret = drm_plane_create_zpos_property(&ipu_plane->base, zpos, 0, 933 - 1); 934 - else 935 928 ret = drm_plane_create_zpos_immutable_property(&ipu_plane->base, 936 - 0); 929 + primary_zpos); 930 + } else { 931 + drm_plane_helper_add(&ipu_plane->base, &ipu_plane_helper_funcs); 932 + ret = drm_plane_create_zpos_property(&ipu_plane->base, 933 + primary_zpos + 1, 0, 934 + primary_zpos + 1); 935 + } 937 936 if (ret) 938 937 return ERR_PTR(ret); 939 938