summaryrefslogtreecommitdiff
path: root/src/managers/PointerManager.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2026-02-21 21:27:59 +0100
committerGitHub <noreply@github.com>2026-02-21 20:27:59 +0000
commit9f59ed786856df8a28430e4084491c7e9fa6234f (patch)
tree30d79f4a842c59e4e630b5e62387e771a1401984 /src/managers/PointerManager.cpp
parenta20142bccead74ea810fcfde54cd7eaa0d0fe5b0 (diff)
multigpu: fix multi gpu checking (#13277)
* multigpu: fix multi gpu checking drmFD() from allocators is not always equal, because we reopen them inside AQ for refcounting, meaning they get duplicated and become their own fds, so checking if fd1 == fd2 ends up wrong. introduce sameGpu in MiscFunctions that checks the actual drmDevice meaning we can now even check if a rendernode is the same gpu as a display node if we want. * multigpu: move sameGpu to DRM namespace move sameGpu out of MiscFunctions to DRM namespace.
Diffstat (limited to 'src/managers/PointerManager.cpp')
-rw-r--r--src/managers/PointerManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp
index 57e25791..2d752ea7 100644
--- a/src/managers/PointerManager.cpp
+++ b/src/managers/PointerManager.cpp
@@ -17,6 +17,7 @@
#include "../desktop/state/FocusState.hpp"
#include "SeatManager.hpp"
#include "../helpers/time/Time.hpp"
+#include "../helpers/Drm.hpp"
#include <cstring>
#include <gbm.h>
#include <cairo/cairo.h>
@@ -440,7 +441,7 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
options.length = 2;
options.scanout = true;
options.cursor = true;
- options.multigpu = state->monitor->m_output->getBackend()->preferredAllocator()->drmFD() != g_pCompositor->m_drm.fd;
+ options.multigpu = !DRM::sameGpu(state->monitor->m_output->getBackend()->preferredAllocator()->drmFD(), g_pCompositor->m_drm.fd);
// We do not set the format (unless shm). If it's unset (DRM_FORMAT_INVALID) then the swapchain will pick for us,
// but if it's set, we don't wanna change it.
if (shouldUseCpuBuffer)