diff --git a/src/backends/drm/egl_gbm_backend.cpp b/src/backends/drm/egl_gbm_backend.cpp index a4b40f748e..bdeaa60cc2 100644 --- a/src/backends/drm/egl_gbm_backend.cpp +++ b/src/backends/drm/egl_gbm_backend.cpp @@ -291,7 +291,7 @@ bool EglGbmBackend::prefer10bpc() const EGLConfig EglGbmBackend::config(uint32_t format) const { - return m_configs[format]; + return m_configs.value(format, EGL_NO_CONFIG_KHR); } QSharedPointer EglGbmBackend::createDrmPipelineLayer(DrmPipeline *pipeline) diff --git a/src/backends/drm/egl_gbm_layer.cpp b/src/backends/drm/egl_gbm_layer.cpp index 38f86e3578..37ddeb435c 100644 --- a/src/backends/drm/egl_gbm_layer.cpp +++ b/src/backends/drm/egl_gbm_layer.cpp @@ -200,6 +200,9 @@ bool EglGbmLayer::createGbmSurface(uint32_t format, const QVector &mod const auto size = m_pipeline->bufferSize(); const auto config = m_eglBackend->config(format); + if (config == EGL_NO_CONFIG_KHR) { + return false; + } QSharedPointer gbmSurface; #if HAVE_GBM_BO_GET_FD_FOR_PLANE