From 169c3bbce0a9c58693cede2d6a3f6dbb0a692335 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Tue, 28 Jan 2025 07:41:37 +1030 Subject: [PATCH] Fix detection of present on separate GPU for the Wayland dmabuf case WaylandWindowSystem::m_presentOnSameGpu is set to true on initialisation and was never being set to false in the case where the present drm device was different from the render device. --- src/core/os/amdgpu/wayland/waylandWindowSystem.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/core/os/amdgpu/wayland/waylandWindowSystem.cpp b/src/core/os/amdgpu/wayland/waylandWindowSystem.cpp index 45b5c1c7..67377c8a 100644 --- a/src/core/os/amdgpu/wayland/waylandWindowSystem.cpp +++ b/src/core/os/amdgpu/wayland/waylandWindowSystem.cpp @@ -1301,11 +1301,8 @@ void WaylandWindowSystem::ConfigPresentOnSameGpu() drmNodeMinor = drmProps.primaryDrmNodeMinor; } - if ((major(m_DmaDevice) == drmNodeMajor) && - (minor(m_DmaDevice) == drmNodeMinor)) - { - m_presentOnSameGpu = true; - } + m_presentOnSameGpu = ((major(m_DmaDevice) == drmNodeMajor) && + (minor(m_DmaDevice) == drmNodeMinor)); } else {