diff options
author | Daniel Stone <daniels@collabora.com> | 2021-11-18 15:21:08 +0000 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2021-12-08 13:38:18 +0000 |
commit | 9e379db082ab99d46295661199f7435d1c7995d9 (patch) | |
tree | c10ebd294ab29c3db2ba502edc24f89dd2211462 /libweston | |
parent | f5086034201f50c0b5df188e376dcb129822155c (diff) |
backend-drm: Early-out in plane assignment for unimportable buffers
No sense walking the plane list every frame if we can't use it because
it's neither a SHM buffer nor a client buffer we can directly import as
a framebuffer.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'libweston')
-rw-r--r-- | libweston/backend-drm/state-propose.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index 247762f4..7ddecd7b 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -773,6 +773,8 @@ drm_output_prepare_plane_view(struct drm_output_state *state, buffer = ev->surface->buffer_ref.buffer; shmbuf = wl_shm_buffer_get(buffer->resource); fb = drm_fb_get_from_view(state, ev, try_view_on_plane_failure_reasons); + if (!shmbuf && !fb) + return NULL; /* assemble a list with possible candidates */ wl_list_for_each(plane, &b->plane_list, link) { |