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: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Lucas Stach authored 7 years ago
Daniel Stone committed 7 years ago
226 | 226 | assert(drm.kms_in_fence_fd != -1); |
227 | 227 | |
228 | 228 | next_bo = gbm_surface_lock_front_buffer(gbm->surface); |
229 | if (!next_bo) { | |
230 | printf("Failed to lock frontbuffer\n"); | |
231 | return -1; | |
232 | } | |
229 | 233 | fb = drm_fb_get_from_bo(next_bo); |
230 | 234 | if (!fb) { |
231 | 235 | printf("Failed to get a new framebuffer BO\n"); |