AnsweredAssumed Answered

Weston / Wayland freeze

Question asked by Robert Pasz on Apr 3, 2020
Latest reply on May 12, 2020 by Yu-Yuan Chen

Weston/Wayland issue related to DRM-KMS and display port. Weston version is 5.0.0, platform imx8m.

I have found an issue in libweston/compositor-drm.c. When connector is unplugged and plugged back, Weston sometimes do not attach primary plane (and get stuck). I found the place in the code where this problem is announced.


static bool
drm_plane_is_available(struct drm_plane *plane, struct drm_output *output)


    /* The plane still has a request not yet completed by the kernel. */
    if (!plane->state_cur->complete) {
        weston_log("ROPA - Plane is bussy \n");
        return false;
    /* The plane is still active on another output. */
    if (plane->state_cur->output && plane->state_cur->output != output) {
        weston_log("ROPA - Plane is still active on another output \n");
        return false;
    /* Check whether the plane can be used with this CRTC; possible_crtcs
     * is a bitmask of CRTC indices (pipe), rather than CRTC object ID. */
    return !!(plane->possible_crtcs & (1 << output->pipe));

It looks that output is not freed when connector is unplugged. Does anybody know how to fix this issue? More precise the place in the code where could be legally released plane->state_cur->output?