diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index c2d6d3eb..c721a3a9 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -112,18 +112,6 @@ drm_output_prepare_overlay_view(struct drm_plane *plane, goto out; } - /* If the surface buffer has an in-fence fd, but the plane - * doesn't support fences, we can't place the buffer on this - * plane. */ - if (ev->surface->acquire_fence_fd >= 0 && - plane->props[WDRM_PLANE_IN_FENCE_FD].prop_id == 0) { - drm_debug(b, "\t\t\t\t[overlay] not placing view %p on overlay: " - "no in-fence support\n", ev); - drm_plane_state_put_back(state); - state = NULL; - goto out; - } - /* We hold one reference for the lifetime of this function; from * calling drm_fb_get_from_view() in drm_output_prepare_plane_view(), * so, we take another reference here to live within the state. */ @@ -309,15 +297,6 @@ drm_output_prepare_scanout_view(struct drm_output_state *output_state, assert(mode == DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY); assert(fb); - /* If the surface buffer has an in-fence fd, but the plane doesn't - * support fences, we can't place the buffer on this plane. */ - if (ev->surface->acquire_fence_fd >= 0 && - scanout_plane->props[WDRM_PLANE_IN_FENCE_FD].prop_id == 0) { - drm_debug(b, "\t\t\t\t[%s] not placing view %p on %s: " - "no in-fence support\n", p_name, ev, p_name); - return NULL; - } - state = drm_output_state_get_plane(output_state, scanout_plane); /* The only way we can already have a buffer in the scanout plane is @@ -694,6 +673,15 @@ drm_output_prepare_plane_view(struct drm_output_state *state, continue; } + /* If the surface buffer has an in-fence fd, but the plane doesn't + * support fences, we can't place the buffer on this plane. */ + if (ev->surface->acquire_fence_fd >= 0 && + plane->props[WDRM_PLANE_IN_FENCE_FD].prop_id == 0) { + drm_debug(b, "\t\t\t\t[%s] not placing view %p on %s: " + "no in-fence support\n", p_name, ev, p_name); + return NULL; + } + if (mode == DRM_OUTPUT_PROPOSE_STATE_MIXED) { assert(scanout_state != NULL); if (scanout_state->zpos >= plane->zpos_max) {