From 3c3771712133d53f15af2873650df600f5e74483 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 16 Mar 2023 20:41:05 +0100 Subject: [PATCH] backends/drm: add more logging for multi gpu --- src/backends/drm/drm_egl_layer_surface.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/backends/drm/drm_egl_layer_surface.cpp b/src/backends/drm/drm_egl_layer_surface.cpp index 8e1a8bba4a..307dd5fe8b 100644 --- a/src/backends/drm/drm_egl_layer_surface.cpp +++ b/src/backends/drm/drm_egl_layer_surface.cpp @@ -205,19 +205,27 @@ std::optional EglGbmLayerSurface::createSurface(con }; std::sort(preferredFormats.begin(), preferredFormats.end(), sort); if (const auto surface = testFormats(preferredFormats, MultiGpuImportMode::Dmabuf)) { + if (m_gpu != m_eglBackend->gpu()) { + qCDebug(KWIN_DRM) << "chose dmabuf import with format" << formatName(surface->gbmSwapchain->format()).name << "and modifier" << surface->gbmSwapchain->modifier(); + } return surface; } if (m_gpu != m_eglBackend->gpu()) { if (const auto surface = testFormats(preferredFormats, MultiGpuImportMode::DumbBuffer)) { + qCDebug(KWIN_DRM) << "chose cpu import with format" << formatName(surface->gbmSwapchain->format()).name << "and modifier" << surface->gbmSwapchain->modifier(); return surface; } } std::sort(fallbackFormats.begin(), fallbackFormats.end(), sort); if (const auto surface = testFormats(fallbackFormats, MultiGpuImportMode::Dmabuf)) { + if (m_gpu != m_eglBackend->gpu()) { + qCDebug(KWIN_DRM) << "chose dmabuf import with format" << formatName(surface->gbmSwapchain->format()).name << "and modifier" << surface->gbmSwapchain->modifier(); + } return surface; } if (m_gpu != m_eglBackend->gpu()) { if (const auto surface = testFormats(fallbackFormats, MultiGpuImportMode::DumbBuffer)) { + qCDebug(KWIN_DRM) << "chose cpu import with format" << formatName(surface->gbmSwapchain->format()).name << "and modifier" << surface->gbmSwapchain->modifier(); return surface; } }