From 5e3de49a057a7b65ee214552f4584421af29e792 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Thu, 6 Feb 2020 16:09:39 -0500 Subject: meta-agl-bsp/meta-arago: update weston bbappend Update weston bbappend orginally from meta-arago/meta-arago-distro to work with zeus. The new weston_7.0.0.bbappend is based on the version from meta-arago's zeus branch as of commit 9646a5e, with some edits to remove unneeded patches after discussion with the meta-ti / meta-arago maintainer. Bug-AGL: SPEC-2932 Change-Id: Ia0a719b1fc7ed2f31c40a2b491cfc5e4b0f71cd0 Signed-off-by: Scott Murray --- ...eston-clients-typo-in-simple-dmabuf-egl.c.patch | 29 -------- ...v-seat-restrict-udev-enumeration-to-card0.patch | 37 ---------- .../0002-Weston-Allow-visual_id-to-be-0.patch | 31 --------- ...virtual-keyboard-display-issue-for-QT5-ap.patch | 39 ----------- ...virtual-keyboard-display-issue-for-QT5-ap.patch | 41 +++++++++++ .../0004-Weston-Fix-touch-screen-crash-issue.patch | 36 ---------- .../0004-weston-Fix-touch-screen-crash-issue.patch | 39 +++++++++++ .../0005-weston-drm-fix-dual-display-issue.patch | 79 ++++++++++++++++++++++ .../meta-ti/recipes-arago/weston/weston_%.bbappend | 25 ------- .../recipes-arago/weston/weston_7.0.0.bbappend | 13 ++++ 10 files changed, 172 insertions(+), 197 deletions(-) delete mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch delete mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-udev-seat-restrict-udev-enumeration-to-card0.patch delete mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0002-Weston-Allow-visual_id-to-be-0.patch delete mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch create mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch delete mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-Weston-Fix-touch-screen-crash-issue.patch create mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-weston-Fix-touch-screen-crash-issue.patch create mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0005-weston-drm-fix-dual-display-issue.patch delete mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend create mode 100644 meta-agl-bsp/meta-ti/recipes-arago/weston/weston_7.0.0.bbappend (limited to 'meta-agl-bsp/meta-ti/recipes-arago/weston') diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch deleted file mode 100644 index 7801bdd57..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 53d7c243ba0baa052081735b8effff4e2679ce65 Mon Sep 17 00:00:00 2001 -From: Kamal Pandey -Date: Thu, 4 Apr 2019 19:45:45 +0530 -Subject: [PATCH] FIX: weston: clients: typo in simple-dmabuf-egl.c - -Fix variable EGL_NO_IMAGE to EGL_NO_IMAGE_KHR in -clients/simple-dmabuf-egl.c - -Signed-off-by: Kamal Pandey ---- - clients/simple-dmabuf-egl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/clients/simple-dmabuf-egl.c b/clients/simple-dmabuf-egl.c -index 75d880e08..2d99c4709 100644 ---- a/clients/simple-dmabuf-egl.c -+++ b/clients/simple-dmabuf-egl.c -@@ -293,7 +293,7 @@ create_fbo_for_buffer(struct display *display, struct buffer *buffer) - EGL_NO_CONTEXT, - EGL_LINUX_DMA_BUF_EXT, - NULL, attribs); -- if (buffer->egl_image == EGL_NO_IMAGE) { -+ if (buffer->egl_image == EGL_NO_IMAGE_KHR) { - fprintf(stderr, "EGLImageKHR creation failed\n"); - return false; - } --- -2.21.0 - diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-udev-seat-restrict-udev-enumeration-to-card0.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-udev-seat-restrict-udev-enumeration-to-card0.patch deleted file mode 100644 index 45d4ec7d6..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-udev-seat-restrict-udev-enumeration-to-card0.patch +++ /dev/null @@ -1,37 +0,0 @@ -From e8e7a9f7dfa164a75fdbdca87622a2e13334478a Mon Sep 17 00:00:00 2001 -From: Anand Balagopalakrishnan -Date: Sat, 23 Jan 2016 22:48:07 +0530 -Subject: [PATCH 1/1] udev-seat: restrict udev enumeration to card0 - -In case of separate GPU and Display devices as found in embedded systems, we -could have modeset node and render node controlled by different drivers. -There is a distinct possibility that udev enumeration returns the DRM device -corresponding to render node as the primary DRM device. - -Obviously, modeset operations cannot be done on the GPU DRM device. - -Restrict the udev enumeration to card0 and ensure that DRM device corresponding -to display is returned as the primary DRM device. - -Upstream-Status: Pending - -Signed-off-by: Anand Balagopalakrishnan ---- - libweston/compositor-drm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index 6777bf8..59c2cc5 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -2827,7 +2827,7 @@ find_primary_gpu(struct drm_backend *b, const char *seat) - - e = udev_enumerate_new(b->udev); - udev_enumerate_add_match_subsystem(e, "drm"); -- udev_enumerate_add_match_sysname(e, "card[0-9]*"); -+ udev_enumerate_add_match_sysname(e, "card0"); - - udev_enumerate_scan_devices(e); - drm_device = NULL; --- -1.7.9.5 diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0002-Weston-Allow-visual_id-to-be-0.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0002-Weston-Allow-visual_id-to-be-0.patch deleted file mode 100644 index b7f467b45..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0002-Weston-Allow-visual_id-to-be-0.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5b5de6a814b43ca023a92b85b407b3d061dbc64f Mon Sep 17 00:00:00 2001 -From: Eric Ruei -Date: Thu, 9 Mar 2017 14:32:24 -0500 -Subject: [PATCH 2/4] Weston: Allow visual_id to be 0 - -The inquiry of visual id from egl API eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID) -is an optional feature. The visual id will be set to 0 if this feature is -not supported. Therefore, the return condition @function match_config_to_visual() -should be (id == visual_id || id == 0) instead of (id == visual_id) - -Signed-off-by: Eric Ruei ---- - libweston/gl-renderer.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c -index 23c0cd7..4c1f170 100644 ---- a/libweston/gl-renderer.c -+++ b/libweston/gl-renderer.c -@@ -2462,7 +2462,7 @@ match_config_to_visual(EGLDisplay egl_display, - &id)) - continue; - -- if (id == visual_id) -+ if (id == visual_id || id == 0) - return i; - } - --- -1.9.1 - diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch deleted file mode 100644 index 126d4ed33..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0d15218ced5bf2e6f3d05758f0f5f21c2a0303f2 Mon Sep 17 00:00:00 2001 -From: Eric Ruei -Date: Thu, 9 Mar 2017 14:33:08 -0500 -Subject: [PATCH 3/4] Weston: Fix virtual keyboard display issue for QT5 - application - -The virtual keyboard does pop up as expected, however, it will never hide -even when the application is terminated. This problem is due to the order -of the text APIs( text_input_activate and test_input_show_input_panel) are -invoked in QT5 and a potential bug of the API implementation. The virtual -keyboard works as expected if the test_input_show_input_panel() is invoked -prior to the test_input_activate() as most of the weston sample applications -do. However, the problem will show up if that order is reversed and the reason -why is that the current_panel is not set in this case and hence this panel -cannot be hidden. - -It is required to set the current_panel to the text_input when the input_panel -becomes visible at the first time. - -Updated for weston 5.0.0 by Scott Murray . - -Signed-off-by: Eric Ruei -Signed-off-by: Scott Murray ---- - compositor/text-backend.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/compositor/text-backend.c b/compositor/text-backend.c -index 664c36f7..b610dfb1 100644 ---- a/compositor/text-backend.c -+++ b/compositor/text-backend.c -@@ -349,6 +349,7 @@ text_input_show_input_panel(struct wl_client *client, - text_input->surface); - wl_signal_emit(&ec->update_input_panel_signal, - &text_input->cursor_rectangle); -+ text_input->manager->current_text_input = text_input; - } - } - diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch new file mode 100644 index 000000000..32901db99 --- /dev/null +++ b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch @@ -0,0 +1,41 @@ +From 8034bc1862bbebb332e91917c6458ef8efb5b54e Mon Sep 17 00:00:00 2001 +From: Eric Ruei +Date: Fri, 8 Mar 2019 18:49:07 -0500 +Subject: [PATCH] weston: Fix virtual keyboard display issue for QT5 + application + +The virtual keyboard does pop up as expected, however, it will never hide +even when the application is terminated. This problem is due to the order +of the text APIs( text_input_activate and test_input_show_input_panel) are +invoked in QT5 and a potential bug of the API implementation. The virtual +keyboard works as expected if the test_input_show_input_panel() is invoked +prior to the test_input_activate() as most of the weston sample applications +do. However, the problem will show up if that order is reversed and the reason +why is that the current_panel is not set in this case and hence this panel +cannot be hidden. + +It is required to set the current_panel to the text_input when the input_panel +becomes visible at the first time. + +Upstream status: Pending + +Signed-off-by: Eric Ruei +--- + compositor/text-backend.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/compositor/text-backend.c b/compositor/text-backend.c +index 664c36f..b610dfb 100644 +--- a/compositor/text-backend.c ++++ b/compositor/text-backend.c +@@ -349,6 +349,7 @@ text_input_show_input_panel(struct wl_client *client, + text_input->surface); + wl_signal_emit(&ec->update_input_panel_signal, + &text_input->cursor_rectangle); ++ text_input->manager->current_text_input = text_input; + } + } + +-- +1.9.1 + diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-Weston-Fix-touch-screen-crash-issue.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-Weston-Fix-touch-screen-crash-issue.patch deleted file mode 100644 index ba20551e1..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-Weston-Fix-touch-screen-crash-issue.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 8958bf21960a475d2933e688d0da9a0d2186d509 Mon Sep 17 00:00:00 2001 -From: Eric Ruei -Date: Thu, 9 Mar 2017 14:34:18 -0500 -Subject: [PATCH 4/4] Weston: Fix touch screen crash issue - -Touch screen operation causes the weston to crash with segment fault sometimes. -The crash occurs when the coordinate (x,y) passed to the weston input module -is outside the view window, hence the weston compositor is not able to pick -up a display view and there is no code to detect this condition at function -notify_touch(). - -Signed-off-by: Eric Ruei ---- - libweston/input.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/libweston/input.c b/libweston/input.c -index 8fe898c..0f72d23 100644 ---- a/libweston/input.c -+++ b/libweston/input.c -@@ -1848,6 +1848,12 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id, - * until all touch points are up again. */ - if (touch->num_tp == 1) { - ev = weston_compositor_pick_view(ec, x, y, &sx, &sy); -+ if (!ev) -+ { -+ weston_log("notify_touch: weston_compositor_pick_view(%d, %d) failed to find a view!\n", -+ wl_fixed_to_int(x), wl_fixed_to_int(y)); -+ return; -+ } - weston_touch_set_focus(touch, ev); - } else if (!touch->focus) { - /* Unexpected condition: We have non-initial touch but --- -1.9.1 - diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-weston-Fix-touch-screen-crash-issue.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-weston-Fix-touch-screen-crash-issue.patch new file mode 100644 index 000000000..4849d5b64 --- /dev/null +++ b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-weston-Fix-touch-screen-crash-issue.patch @@ -0,0 +1,39 @@ +From 60250e9dc57fe56148c8a24bba107bce8a873fb4 Mon Sep 17 00:00:00 2001 +From: Karthik Ramanan +Date: Mon, 12 Mar 2018 10:56:28 +0530 +Subject: [PATCH 4/4] weston: Fix touch screen crash issue + +Touch screen operation causes the weston to crash with segment fault sometimes. +The crash occurs when the coordinate (x,y) passed to the weston input module +is outside the view window, hence the weston compositor is not able to pick +up a display view and there is no code to detect this condition at function +notify_touch(). + +Upstream status: pending + +Signed-off-by: Eric Ruei +Signed-off-by: Karthik Ramanan +--- + libweston/input.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libweston/input.c b/libweston/input.c +index 4fedc55..bcb2f28 100644 +--- a/libweston/input.c ++++ b/libweston/input.c +@@ -2185,6 +2185,12 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id, + * until all touch points are up again. */ + if (touch->num_tp == 1) { + ev = weston_compositor_pick_view(ec, x, y, &sx, &sy); ++ if (!ev) ++ { ++ weston_log("notify_touch: weston_compositor_pick_view(%d, %d) failed to find a view!\n", ++ wl_fixed_to_int(x), wl_fixed_to_int(y)); ++ return; ++ } + weston_touch_set_focus(touch, ev); + } else if (!touch->focus) { + /* Unexpected condition: We have non-initial touch but +-- +1.9.1 + diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0005-weston-drm-fix-dual-display-issue.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0005-weston-drm-fix-dual-display-issue.patch new file mode 100644 index 000000000..9b06b81b3 --- /dev/null +++ b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0005-weston-drm-fix-dual-display-issue.patch @@ -0,0 +1,79 @@ +From db6f5ce008d9b8a4cc7db71659ce1d21d3d7f97f Mon Sep 17 00:00:00 2001 +From: Eric Ruei +Date: Tue, 26 Mar 2019 13:32:31 -0400 +Subject: [PATCH 3/3] weston: drm: fix dual display issue + +This patch fixes the dual display issue by enhancing the primary plane +search algorithm to keep the plane which is connected to the crtc of +the output because the direct switching of active planes is not allowed. + +Upstream status: Pending + +Signed-off-by: Eric Ruei +--- + libweston/compositor-drm.c | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c +index 3891176..fa694c3 100644 +--- a/libweston/compositor-drm.c ++++ b/libweston/compositor-drm.c +@@ -428,6 +428,7 @@ struct drm_plane { + + uint32_t possible_crtcs; + uint32_t plane_id; ++ uint32_t crtc_id; + uint32_t count_formats; + + struct drm_property_info props[WDRM_PLANE__COUNT]; +@@ -4073,6 +4074,7 @@ drm_plane_create(struct drm_backend *b, const drmModePlane *kplane, + if (kplane) { + plane->possible_crtcs = kplane->possible_crtcs; + plane->plane_id = kplane->plane_id; ++ plane->crtc_id = kplane->crtc_id; + + props = drmModeObjectGetProperties(b->drm.fd, kplane->plane_id, + DRM_MODE_OBJECT_PLANE); +@@ -4097,6 +4099,7 @@ drm_plane_create(struct drm_backend *b, const drmModePlane *kplane, + else { + plane->possible_crtcs = (1 << output->pipe); + plane->plane_id = 0; ++ plane->crtc_id = 0; + plane->count_formats = 1; + plane->formats[0].format = format; + plane->type = type; +@@ -4157,6 +4160,7 @@ drm_output_find_special_plane(struct drm_backend *b, struct drm_output *output, + enum wdrm_plane_type type) + { + struct drm_plane *plane; ++ struct drm_plane *plane2 = NULL; /* secondary plane */ + + if (!b->universal_planes) { + uint32_t format; +@@ -4204,11 +4208,22 @@ drm_output_find_special_plane(struct drm_backend *b, struct drm_output *output, + if (found_elsewhere) + continue; + ++ /* The output should keep the primary plane connected to its ++ * crtc since the direct switching of active plane is not ++ * allowed. */ ++ if ((type == WDRM_PLANE_TYPE_PRIMARY) && ++ (plane->crtc_id != output->crtc_id)) { ++ if (plane->crtc_id == 0) { ++ plane->possible_crtcs = (1 << output->pipe); ++ plane2 = plane; ++ } ++ continue; ++ } + plane->possible_crtcs = (1 << output->pipe); + return plane; + } + +- return NULL; ++ return plane2; + } + + /** +-- +1.9.1 + diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend deleted file mode 100644 index 718d6f86a..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend +++ /dev/null @@ -1,25 +0,0 @@ -# When configured for fbdev compositor, make it the default -PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor WESTON_NATIVE_BACKEND="fbdev-backend.so",--disable-fbdev-compositor,udev mtdev" -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/libgbm mtdev" - -PR_append = ".agl_arago_23" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -RDEPENDS_${PN} += "weston-conf" - -####################### F I X M E ########################## -DISABLED_SRC_URI += " \ - file://0001-Add-soc-performance-monitor-utilites.patch \ -" -####################### F I X M E ########################## - -SRC_URI += " \ - file://0001-FIX-weston-clients-typo-in-simple-dmabuf-egl.c.patch \ - file://0002-Weston-Allow-visual_id-to-be-0.patch \ - file://0003-Weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch \ - file://0004-Weston-Fix-touch-screen-crash-issue.patch \ -" - - -RDEPENDS_${PN}_remove = "weston-conf" diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_7.0.0.bbappend b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_7.0.0.bbappend new file mode 100644 index 000000000..21c912a66 --- /dev/null +++ b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_7.0.0.bbappend @@ -0,0 +1,13 @@ +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/libgbm mtdev" + +PR_append = ".arago2" + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +# file://0005-weston-drm-fix-dual-display-issue.patch +SRC_URI += " \ + file://0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch \ + file://0004-weston-Fix-touch-screen-crash-issue.patch \ +" + +INHIBIT_PACKAGE_STRIP = "1" -- cgit 1.2.3-korg