mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
wayland/dma-buf: Handle failing to import scanout DMA buffer
A DMA buffer might not be able to scanout, and in that case the import with GBM_BO_USE_SCANOUT will fail. Handle that by failing to scanout, effectively falling back to compositing. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1261
This commit is contained in:
parent
b97a6e62a3
commit
dbf47b652e
@ -277,6 +277,11 @@ meta_wayland_dma_buf_try_acquire_scanout (MetaWaylandDmaBufBuffer *dma_buf,
|
|||||||
|
|
||||||
gpu_kms = meta_renderer_native_get_primary_gpu (renderer_native);
|
gpu_kms = meta_renderer_native_get_primary_gpu (renderer_native);
|
||||||
gbm_bo = create_gbm_bo (dma_buf, gpu_kms, n_planes, &use_modifier);
|
gbm_bo = create_gbm_bo (dma_buf, gpu_kms, n_planes, &use_modifier);
|
||||||
|
if (!gbm_bo)
|
||||||
|
{
|
||||||
|
g_debug ("Failed to import scanout gbm_bo: %s", g_strerror (errno));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
fb = meta_drm_buffer_gbm_new_take (gpu_kms, gbm_bo,
|
fb = meta_drm_buffer_gbm_new_take (gpu_kms, gbm_bo,
|
||||||
use_modifier,
|
use_modifier,
|
||||||
|
Loading…
Reference in New Issue
Block a user