diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2026-02-21 21:27:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-21 20:27:59 +0000 |
| commit | 9f59ed786856df8a28430e4084491c7e9fa6234f (patch) | |
| tree | 30d79f4a842c59e4e630b5e62387e771a1401984 /src/helpers/Monitor.cpp | |
| parent | a20142bccead74ea810fcfde54cd7eaa0d0fe5b0 (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/helpers/Monitor.cpp')
| -rw-r--r-- | src/helpers/Monitor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index f03315ca..6cc0087a 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -32,6 +32,7 @@ #include "time/Time.hpp" #include "../desktop/view/LayerSurface.hpp" #include "../desktop/state/FocusState.hpp" +#include "Drm.hpp" #include <aquamarine/output/Output.hpp> #include "debug/log/Logger.hpp" #include "debug/HyprNotificationOverlay.hpp" @@ -1895,7 +1896,7 @@ bool CMonitor::attemptDirectScanout() { m_output->state->addDamage(PSURFACE->m_current.accumulateBufferDamage()); // multigpu needs a fence to trigger fence syncing blits and also committing with the recreated dgpu fence - if (m_output->getBackend()->preferredAllocator()->drmFD() != g_pCompositor->m_drm.fd && g_pHyprOpenGL->explicitSyncSupported()) { + if (!DRM::sameGpu(m_output->getBackend()->preferredAllocator()->drmFD(), g_pCompositor->m_drm.fd) && g_pHyprOpenGL->explicitSyncSupported()) { auto sync = CEGLSync::create(); if (sync->fd().isValid()) { |
