backend-drm: Early-out for non-SHM buffers in renderer-only mode

If we're in renderer-only mode, we can only use the renderer and the
cursor plane. Don't even try to import client buffers as it makes no
sense.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 3 years ago
parent 6aec64b2f7
commit 9c6a069435
  1. 19
      libweston/backend-drm/state-propose.c

@ -699,10 +699,16 @@ drm_output_prepare_plane_view(struct drm_output_state *state,
return NULL;
}
} else {
fb = drm_fb_get_from_view(state, ev, try_view_on_plane_failure_reasons);
if (mode == DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY) {
drm_debug(b, "\t\t\t\t[view] not assigning view %p "
"to plane: renderer-only mode\n", ev);
return NULL;
}
if (!shmbuf && !fb)
fb = drm_fb_get_from_view(state, ev, try_view_on_plane_failure_reasons);
if (!fb)
return NULL;
}
/* assemble a list with possible candidates */
wl_list_for_each(plane, &b->plane_list, link) {
@ -748,15 +754,6 @@ drm_output_prepare_plane_view(struct drm_output_state *state,
}
}
if (mode == DRM_OUTPUT_PROPOSE_STATE_RENDERER_ONLY &&
(plane->type == WDRM_PLANE_TYPE_OVERLAY ||
plane->type == WDRM_PLANE_TYPE_PRIMARY)) {
drm_debug(b, "\t\t\t\t[plane] not adding plane %d to "
"candidate list: renderer-only mode\n",
plane->plane_id);
continue;
}
if (plane->type != WDRM_PLANE_TYPE_CURSOR &&
(!fb || !(fb->plane_mask & (1 << plane->plane_idx)))) {
*try_view_on_plane_failure_reasons |=

Loading…
Cancel
Save