0001-REVERTME-always-set-primary-zpos-as-zpos_min-0.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 5f5880ff73a3d1f1140fc78c7583401d756e1283 Mon Sep 17 00:00:00 2001
  2. From: Yugang <fanyugang.fyg@linux.alibaba.com>
  3. Date: Wed, 16 Mar 2022 10:09:06 +0800
  4. Subject: [PATCH] REVERTME: always set primary zpos as zpos_min(0).
  5. Current weston drm don't set the primary plane zpos
  6. after plane alloc, the plane will keep the invalid
  7. zpos and caused the overlay black ground issue.
  8. ---
  9. libweston/backend-drm/kms.c | 10 +++++++++-
  10. 1 file changed, 9 insertions(+), 1 deletion(-)
  11. diff --git a/libweston/backend-drm/kms.c b/libweston/backend-drm/kms.c
  12. index 68412214..d3f723bc 100644
  13. --- a/libweston/backend-drm/kms.c
  14. +++ b/libweston/backend-drm/kms.c
  15. @@ -1029,10 +1029,18 @@ drm_output_apply_state_atomic(struct drm_output_state *state,
  16. /* do note, that 'invented' zpos values are set as immutable */
  17. if (plane_state->zpos != DRM_PLANE_ZPOS_INVALID_PLANE &&
  18. - plane_state->plane->zpos_min != plane_state->plane->zpos_max)
  19. + plane_state->plane->zpos_min != plane_state->plane->zpos_max) {
  20. ret |= plane_add_prop(req, plane,
  21. WDRM_PLANE_ZPOS,
  22. plane_state->zpos);
  23. + } else if (plane_state->plane->type == WDRM_PLANE_TYPE_PRIMARY){
  24. + /* Always set primary plane zpos as zpos min as zpos */
  25. + /* can't be set after plane state alloc */
  26. + plane_state->zpos = plane_state->plane->zpos_min;
  27. + ret |= plane_add_prop(req, plane,
  28. + WDRM_PLANE_ZPOS,
  29. + plane_state->zpos);
  30. + }
  31. if (ret != 0) {
  32. weston_log("couldn't set plane state\n");
  33. --
  34. 2.17.1