drm: xlnx: zynqmp_dpsub: Expose plane ordering to userspace
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 7 Mar 2021 00:56:58 +0000 (02:56 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 8 Aug 2021 23:28:05 +0000 (02:28 +0300)
While the DPSUB has a fixed plane order, it still makes sense to expose
it to userspace to avoid hardcoding assumptions. Do so by adding an
immutable zpos property to planes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/gpu/drm/xlnx/zynqmp_disp.c

index d87af7c..e377974 100644 (file)
@@ -1252,6 +1252,7 @@ static int zynqmp_disp_create_planes(struct zynqmp_disp *disp)
                drm_plane_helper_add(&layer->plane,
                                     &zynqmp_disp_plane_helper_funcs);
 
+               drm_plane_create_zpos_immutable_property(&layer->plane, i);
                if (zynqmp_disp_layer_is_gfx(layer))
                        drm_plane_create_alpha_property(&layer->plane);
        }