Currently no zpos are defined for vkms planes. This is not yet an issue, but with the future introduction of configfs, we need to have a way to properly order plane composition.
In order to make it predictable, add zpos=0 for primary, zpos=1 for overlays and zpos=2 for cursor. This will be configurable later. Signed-off-by: Louis Chauvet <[email protected]> --- drivers/gpu/drm/vkms/vkms_plane.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index e3fdd161d0f0a1d20c14a79dbe51c08c8486d12f..44bf9eedf5a7641f2eb171c8995079ca65dfa04e 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -232,5 +232,17 @@ struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev, DRM_COLOR_YCBCR_BT601, DRM_COLOR_YCBCR_FULL_RANGE); + switch (type) { + case DRM_PLANE_TYPE_PRIMARY: + drm_plane_create_zpos_immutable_property(&plane->base, 0); + break; + case DRM_PLANE_TYPE_OVERLAY: + drm_plane_create_zpos_immutable_property(&plane->base, 1); + break; + case DRM_PLANE_TYPE_CURSOR: + drm_plane_create_zpos_immutable_property(&plane->base, 2); + break; + } + return plane; } -- 2.50.1
