Commit ac7e6c72 authored by Lucas Stach's avatar Lucas Stach Committed by Daniel Stone

drm-atomic: check for valid GBM BO

With the modifier support it is possible to force a modifier which isn't
compatible with any of the GPU targets. In that case the EGL platform will
be unable to allocate the back buffers.

Provide an error message in that case, instead of crashing.
Signed-off-by: 's avatarLucas Stach <>
Reviewed-by: 's avatarDaniel Stone <>
parent 83d33948
......@@ -227,6 +227,10 @@ static int atomic_run(const struct gbm *gbm, const struct egl *egl)
assert(drm.kms_in_fence_fd != -1);
next_bo = gbm_surface_lock_front_buffer(gbm->surface);
if (!next_bo) {
printf("Failed to lock frontbuffer\n");
return -1;
fb = drm_fb_get_from_bo(next_bo);
if (!fb) {
printf("Failed to get a new framebuffer BO\n");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment