weston: modify default z-order for OSD plane [1/1]
PD#SWPL-181397
Problem:
OSD plane zorder issue.
Solution:
modify default z-order for OSD plane.
Verify:
ah212
Change-Id: I4905e4e0ff365169a2091b8df995e63cb6764da1
Signed-off-by: limin.tian <limin.tian@amlogic.com>
diff --git a/libweston/backend-drm/drm-internal.h b/libweston/backend-drm/drm-internal.h
index 7b471c6..716d92b 100644
--- a/libweston/backend-drm/drm-internal.h
+++ b/libweston/backend-drm/drm-internal.h
@@ -72,6 +72,10 @@
#define DRM_PLANE_ZPOS_INVALID_PLANE 0xffffffffffffffffULL
#endif
+#ifndef DEFAULT_OSD_PLANE_ZPOS
+#define DEFAULT_OSD_PLANE_ZPOS 65
+#endif
+
/**
* A small wrapper to print information into the 'drm-backend' debug scope.
*
diff --git a/libweston/backend-drm/kms.c b/libweston/backend-drm/kms.c
index 54c2832..fd7d6ac 100644
--- a/libweston/backend-drm/kms.c
+++ b/libweston/backend-drm/kms.c
@@ -1028,6 +1028,12 @@
}
#ifdef USE_DEFAULT_Z_ORDER
//use drm default palne z-order
+ if (!plane_state->plane->is_video_plane) {
+ plane_state->zpos = DEFAULT_OSD_PLANE_ZPOS + plane_state->plane->plane_idx;
+ ret |= plane_add_prop(req, plane,
+ WDRM_PLANE_ZPOS,
+ plane_state->zpos);
+ }
#else
/* do note, that 'invented' zpos values are set as immutable */
if (plane_state->zpos != DRM_PLANE_ZPOS_INVALID_PLANE &&