Subject: [PATCH 12/24] wip: add grouped runtime authority

From: Justin Youens <[email-masked]>
Date: Sat, 15 Aug 2026 10:00:58 -0500

---
 CMakeLists.txt                            |   3 +-
 src/backend/drm/TiledDRMIntegration.cpp   | 103 +++--
 src/backend/drm/TiledDRMIntegration.hpp   |   9 +-
 src/backend/drm/TiledOutputBridge.cpp     |  10 +-
 src/backend/drm/TiledOutputBridge.hpp     |   4 +
 src/backend/drm/TiledRuntimeAuthority.cpp | 464 ++++++++++++++++++++++
 src/backend/drm/TiledRuntimeAuthority.hpp | 208 ++++++++++
 tests/TiledAtomic.cpp                     | 165 ++++++++
 tests/TiledDRMIntegration.cpp             |   5 +-
 9 files changed, 939 insertions(+), 32 deletions(-)
 create mode 100644 src/backend/drm/TiledRuntimeAuthority.cpp
 create mode 100644 src/backend/drm/TiledRuntimeAuthority.hpp

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41757bdf3052c70e04a70fb363740b44fdb7477e..e8d1e47619e25e943754558f1b6ffdfeebe252b3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,7 +72,8 @@ set(AQUAMARINE_TILED_PRIVATE_SOURCES
     "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledDRMIntegration.cpp"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledAtomic.cpp"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledOutputBridge.cpp"
-    "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledRuntime.cpp")
+    "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledRuntime.cpp"
+    "${CMAKE_CURRENT_SOURCE_DIR}/src/backend/drm/TiledRuntimeAuthority.cpp")
 list(REMOVE_ITEM SRCFILES ${AQUAMARINE_TILED_PRIVATE_SOURCES})
 
 add_library(aquamarine_tiled_private STATIC ${AQUAMARINE_TILED_PRIVATE_SOURCES})
diff --git a/src/backend/drm/TiledDRMIntegration.cpp b/src/backend/drm/TiledDRMIntegration.cpp
index 82505f5a46f5ffad663b48e348db77f3ea07a813..2acc2e8b71412bf3491930477524d78f51b1460d 100644
--- a/src/backend/drm/TiledDRMIntegration.cpp
+++ b/src/backend/drm/TiledDRMIntegration.cpp
@@ -17,6 +17,7 @@ using namespace Aquamarine::NDRM::NTiledDRMIntegration;
 using namespace Aquamarine::NDRM::NTiledIncarnations;
 using namespace Aquamarine::NDRM::NTiledCrtcAllocator;
 using namespace Aquamarine::NDRM::NTiledOutputBridge;
+using namespace Aquamarine::NDRM::NTiledRuntimeAuthority;
 using namespace Aquamarine::NDRM::NTiledScan;
 
 namespace {
@@ -65,16 +66,17 @@ namespace {
 class CTiledDRMIntegrationRegistry::CImpl {
   public:
     struct SEntry {
-        PBackendLifetime                   lifetime;
-        PDeviceIncarnation                 device;
-        PSessionIncarnation                session;
-        uint64_t                           resourceEpoch   = 0;
-        uint64_t                           allocationEpoch = 0;
-        PAllocationShadow                  allocationShadow;
-        CSharedPointer<COutputBridgeState> outputBridge;
-        bool                               allocationGateActive = false;
-        bool                               detachBegun          = false;
-        eDetachReason                      detachReason         = eDetachReason::BACKEND_SHUTDOWN;
+        PBackendLifetime                                            lifetime;
+        PDeviceIncarnation                                          device;
+        PSessionIncarnation                                         session;
+        uint64_t                                                    resourceEpoch   = 0;
+        uint64_t                                                    allocationEpoch = 0;
+        PAllocationShadow                                           allocationShadow;
+        CSharedPointer<COutputBridgeState>                          outputBridge;
+        Hyprutils::Memory::CUniquePointer<CGroupedRuntimeAuthority> groupedRuntime;
+        bool                                                        allocationGateActive = false;
+        bool                                                        detachBegun          = false;
+        eDetachReason                                               detachReason         = eDetachReason::BACKEND_SHUTDOWN;
     };
 
     explicit CImpl(std::thread::id thread) : eventThread(thread), scanRegistry(thread) {}
@@ -104,11 +106,17 @@ class CTiledDRMIntegrationRegistry::CImpl {
     }
 
     void invalidateOutputBridge(SEntry& entry) noexcept {
+        if (entry.groupedRuntime)
+            static_cast<void>(entry.groupedRuntime->quiesceAll(eTiledQuiesceReason::INVALID_TOPOLOGY));
         entry.allocationShadow.reset();
         if (!entry.outputBridge || !entry.outputBridge->clear())
             std::terminate();
     }
 
+    [[nodiscard]] bool mutationBusy(const SEntry& entry) const noexcept {
+        return entry.allocationGateActive || (entry.groupedRuntime && entry.groupedRuntime->busy());
+    }
+
     std::thread::id                        eventThread;
     CTiledBackendStateRegistry             scanRegistry;
     std::map<const void*, SEntry>          entries;
@@ -165,9 +173,11 @@ SBeginConnectorScanResult CTiledDRMIntegrationRegistry::beginAttached(const void
     const auto ENTRY = m_impl->entries.find(key);
     if (ENTRY == m_impl->entries.end() || ENTRY->second.detachBegun)
         return {.result = eScanBeginResult::INVALID_STATE};
-    if (ENTRY->second.allocationGateActive)
+    if (m_impl->mutationBusy(ENTRY->second))
         return {.result = eScanBeginResult::BUSY};
 
+    if (ENTRY->second.groupedRuntime)
+        static_cast<void>(ENTRY->second.groupedRuntime->quiesceAll(eTiledQuiesceReason::INCOMPLETE_SCAN));
     setLastScan(key, false);
     m_impl->invalidateOutputBridge(ENTRY->second);
     if (ENTRY->second.resourceEpoch == std::numeric_limits<uint64_t>::max())
@@ -271,10 +281,11 @@ SBeginConnectorScanResult CTiledDRMIntegrationRegistry::beginConnectorScan(const
     try {
         const auto [ITERATOR, INSERTED] = m_impl->entries.emplace(KEY,
                                                                   CImpl::SEntry{
-                                                                      .lifetime     = lifetime,
-                                                                      .device       = device,
-                                                                      .session      = session,
-                                                                      .outputBridge = CSharedPointer<COutputBridgeState>{new COutputBridgeState{m_impl->eventThread}},
+                                                                      .lifetime       = lifetime,
+                                                                      .device         = device,
+                                                                      .session        = session,
+                                                                      .outputBridge   = CSharedPointer<COutputBridgeState>{new COutputBridgeState{m_impl->eventThread}},
+                                                                      .groupedRuntime = Hyprutils::Memory::makeUnique<CGroupedRuntimeAuthority>(m_impl->eventThread),
                                                                   });
         inserted                        = INSERTED;
         if (!INSERTED) {
@@ -359,10 +370,11 @@ SBeginConnectorScanResult CTiledDRMIntegrationRegistry::beginTestConnectorScan(c
     try {
         const auto [ITERATOR, INSERTED] = m_impl->entries.emplace(KEY,
                                                                   CImpl::SEntry{
-                                                                      .lifetime     = lifetime,
-                                                                      .device       = device,
-                                                                      .session      = session,
-                                                                      .outputBridge = CSharedPointer<COutputBridgeState>{new COutputBridgeState{m_impl->eventThread}},
+                                                                      .lifetime       = lifetime,
+                                                                      .device         = device,
+                                                                      .session        = session,
+                                                                      .outputBridge   = CSharedPointer<COutputBridgeState>{new COutputBridgeState{m_impl->eventThread}},
+                                                                      .groupedRuntime = Hyprutils::Memory::makeUnique<CGroupedRuntimeAuthority>(m_impl->eventThread),
                                                                   });
         inserted                        = INSERTED;
         if (!INSERTED) {
@@ -535,7 +547,7 @@ eAllocationCaptureResult CTiledDRMIntegrationRegistry::captureAllocationKey(cons
     const auto ENTRY = m_impl->entries.find(key);
     if (ENTRY == m_impl->entries.end() || ENTRY->second.detachBegun)
         return eAllocationCaptureResult::NO_CURRENT_SCAN;
-    if (ENTRY->second.allocationGateActive)
+    if (m_impl->mutationBusy(ENTRY->second))
         return eAllocationCaptureResult::BUSY;
 
     // A failed replacement never leaves an older shadow looking current.
@@ -790,7 +802,12 @@ eAllocationCaptureResult CTiledDRMIntegrationRegistry::captureAllocationKey(cons
             const auto PREPARED = ENTRY->second.outputBridge->prepare(PLAN);
             if (!PREPARED)
                 return;
-            bridgeInstalled = ENTRY->second.outputBridge->install(PREPARED.prepared, current) == eInstallResult::INSTALLED;
+            if (ENTRY->second.outputBridge->install(PREPARED.prepared, current) != eInstallResult::INSTALLED)
+                return;
+            bridgeInstalled = ENTRY->second.outputBridge->withCurrentOwner(current, [&](const POutputBridgeObservation& installed) {
+                if (ENTRY->second.groupedRuntime)
+                    static_cast<void>(ENTRY->second.groupedRuntime->reconcileCurrent(installed));
+            });
         });
         if (!CURRENT || !bridgeInstalled)
             return eAllocationCaptureResult::INVALID_CAPTURE;
@@ -843,7 +860,7 @@ bool CTiledDRMIntegrationRegistry::withCurrentAllocationKey(const void* key, con
     if (!THREAD || *THREAD != std::this_thread::get_id() || !expected || !callback)
         return false;
     const auto ENTRY = m_impl->entries.find(key);
-    if (ENTRY == m_impl->entries.end() || ENTRY->second.detachBegun || ENTRY->second.allocationGateActive || !ENTRY->second.allocationShadow ||
+    if (ENTRY == m_impl->entries.end() || ENTRY->second.detachBegun || m_impl->mutationBusy(ENTRY->second) || !ENTRY->second.allocationShadow ||
         ENTRY->second.allocationShadow.impl_ != expected.impl_ || !expected->m_plan)
         return false;
     auto* const STATE = m_impl->scanRegistry.find(ENTRY->second.lifetime);
@@ -910,6 +927,24 @@ bool CTiledDRMIntegrationRegistry::withCurrentOutputBridge(const CWeakPointer<CD
     return withCurrentOutputBridgeKey(backend.impl_, expected, callback);
 }
 
+SGroupedPageFlipResult CTiledDRMIntegrationRegistry::routeGroupedPageFlipKey(const void* key, uintptr_t transactionId, uint32_t crtcId, uint32_t sequence,
+                                                                             uint64_t timestampNs) noexcept {
+    const auto THREAD = m_impl->registeredThread(key);
+    if (!THREAD || *THREAD != std::this_thread::get_id())
+        return {.claimed = transactionId != 0, .disposition = eGroupedPageFlipDisposition::WRONG_THREAD};
+    const auto ENTRY = m_impl->entries.find(key);
+    if (ENTRY == m_impl->entries.end() || !ENTRY->second.groupedRuntime)
+        return {};
+    if (ENTRY->second.allocationGateActive)
+        return {.claimed = transactionId != 0, .disposition = eGroupedPageFlipDisposition::BUSY};
+    return ENTRY->second.groupedRuntime->routePageFlip(transactionId, crtcId, sequence, timestampNs);
+}
+
+SGroupedPageFlipResult CTiledDRMIntegrationRegistry::routeGroupedPageFlip(const CWeakPointer<CDRMBackend>& backend, uintptr_t transactionId, uint32_t crtcId, uint32_t sequence,
+                                                                          uint64_t timestampNs) noexcept {
+    return routeGroupedPageFlipKey(backend.impl_, transactionId, crtcId, sequence, timestampNs);
+}
+
 bool CTiledDRMIntegrationRegistry::withCurrentTestAllocationShadow(const PBackendLifetime& lifetime, const PAllocationShadow& expected,
                                                                    const std::function<void(const CPlan&, const SCurrentState&)>& callback) noexcept {
     return withCurrentAllocationKey(lifetime.impl_, expected, callback);
@@ -930,9 +965,11 @@ eSessionResult CTiledDRMIntegrationRegistry::rotateSessionKey(const void* key) n
     const auto ENTRY = m_impl->entries.find(key);
     if (ENTRY == m_impl->entries.end() || ENTRY->second.detachBegun)
         return eSessionResult::INVALID_STATE;
-    if (ENTRY->second.allocationGateActive)
+    if (m_impl->mutationBusy(ENTRY->second))
         return eSessionResult::BUSY;
 
+    if (ENTRY->second.groupedRuntime)
+        static_cast<void>(ENTRY->second.groupedRuntime->quiesceAll(eTiledQuiesceReason::SESSION_INACTIVE));
     setLastScan(key, false);
     m_impl->invalidateOutputBridge(ENTRY->second);
     auto* const STATE = m_impl->scanRegistry.find(ENTRY->second.lifetime);
@@ -981,9 +1018,11 @@ eDetachResult CTiledDRMIntegrationRegistry::beginDetachKey(const void* key, eDet
         return eDetachResult::INVALID_STATE;
     if (ENTRY->second.detachBegun)
         return eDetachResult::ALREADY_BEGUN;
-    if (ENTRY->second.allocationGateActive)
+    if (m_impl->mutationBusy(ENTRY->second))
         return eDetachResult::BUSY;
 
+    if (ENTRY->second.groupedRuntime)
+        static_cast<void>(ENTRY->second.groupedRuntime->quiesceAll(eTiledQuiesceReason::BACKEND_TEARDOWN));
     setLastScan(key, false);
     m_impl->invalidateOutputBridge(ENTRY->second);
 
@@ -1017,10 +1056,16 @@ eDetachResult CTiledDRMIntegrationRegistry::eraseDetachedKey(const void* key) no
     const auto ENTRY = m_impl->entries.find(key);
     if (ENTRY == m_impl->entries.end())
         return eDetachResult::INVALID_STATE;
-    if (ENTRY->second.allocationGateActive)
+    if (m_impl->mutationBusy(ENTRY->second))
         return eDetachResult::BUSY;
     if (!ENTRY->second.detachBegun)
         return eDetachResult::INVALID_STATE;
+    const auto REGISTRY_PROOF =
+        ENTRY->second.detachReason == eDetachReason::GPU_REMOVED ? eTiledRegistryShutdownProof::DRM_DEVICE_GONE : eTiledRegistryShutdownProof::BACKEND_NO_CALLBACKS;
+    const auto RUNTIME_PROOF =
+        ENTRY->second.detachReason == eDetachReason::GPU_REMOVED ? eTiledRetirementProof::DRM_DEVICE_GONE : eTiledRetirementProof::BACKEND_TEARDOWN_NO_CALLBACKS;
+    if (!ENTRY->second.groupedRuntime || !ENTRY->second.groupedRuntime->terminalShutdown(REGISTRY_PROOF, RUNTIME_PROOF))
+        return eDetachResult::INVALID_STATE;
     if (m_impl->scanRegistry.erase(ENTRY->second.lifetime) != eRegistryResult::OK)
         return eDetachResult::INVALID_STATE;
 
@@ -1110,7 +1155,7 @@ bool CTiledDRMIntegrationRegistry::exhaustTestResourceEpoch(const PBackendLifeti
     if (!m_impl->onEventThread() || !lifetime)
         return false;
     const auto ENTRY = m_impl->entries.find(lifetime.impl_);
-    if (ENTRY == m_impl->entries.end() || ENTRY->second.detachBegun || ENTRY->second.allocationGateActive || ENTRY->second.lifetime != lifetime)
+    if (ENTRY == m_impl->entries.end() || ENTRY->second.detachBegun || m_impl->mutationBusy(ENTRY->second) || ENTRY->second.lifetime != lifetime)
         return false;
     ENTRY->second.resourceEpoch = std::numeric_limits<uint64_t>::max();
     return true;
@@ -1162,6 +1207,12 @@ bool Aquamarine::NDRM::NTiledDRMIntegration::withCurrentOutputBridge(const CWeak
     return REGISTRY && REGISTRY->withCurrentOutputBridge(backend, expected, callback);
 }
 
+SGroupedPageFlipResult Aquamarine::NDRM::NTiledDRMIntegration::routeGroupedPageFlip(const CWeakPointer<CDRMBackend>& backend, uintptr_t transactionId, uint32_t crtcId,
+                                                                                    uint32_t sequence, uint64_t timestampNs) noexcept {
+    auto* const REGISTRY = productionRegistryIfCreated();
+    return REGISTRY ? REGISTRY->routeGroupedPageFlip(backend, transactionId, crtcId, sequence, timestampNs) : SGroupedPageFlipResult{};
+}
+
 eSessionResult Aquamarine::NDRM::NTiledDRMIntegration::rotateSession(const CWeakPointer<CDRMBackend>& backend) noexcept {
     auto* const REGISTRY = productionRegistryIfCreated();
     return REGISTRY ? REGISTRY->rotateSession(backend) : eSessionResult::NOT_ATTACHED;
diff --git a/src/backend/drm/TiledDRMIntegration.hpp b/src/backend/drm/TiledDRMIntegration.hpp
index 4acf8437fd777041d8bb71237f036560e59b374a..3120cba4f91002ae93e2de59486facffff9a5b9d 100644
--- a/src/backend/drm/TiledDRMIntegration.hpp
+++ b/src/backend/drm/TiledDRMIntegration.hpp
@@ -2,6 +2,7 @@
 
 #include "TiledCrtcAllocator.hpp"
 #include "TiledOutputBridge.hpp"
+#include "TiledRuntimeAuthority.hpp"
 
 #include <aquamarine/backend/DRM.hpp>
 
@@ -29,6 +30,7 @@ namespace Aquamarine::NDRM::NTiledDRMIntegration { // NOLINT(readability-identif
     using NTiledCrtcAllocator::CPlan;
     using NTiledCrtcAllocator::SCurrentState;
     using NTiledOutputBridge::POutputBridgeObservation;
+    using NTiledRuntimeAuthority::SGroupedPageFlipResult;
     using NTiledScan::PCommittedScan;
     using NTiledScan::PPreparedScan;
     using NTiledScan::PScanAttemptTicket;
@@ -218,6 +220,8 @@ namespace Aquamarine::NDRM::NTiledDRMIntegration { // NOLINT(readability-identif
                                                                             const std::function<void(const CPlan&, const SCurrentState&)>& callback) noexcept;
         [[nodiscard]] bool                      withCurrentOutputBridge(const CWeakPointer<CDRMBackend>& backend, const PAllocationShadow& expected,
                                                                         const std::function<void(const POutputBridgeObservation&)>& callback) noexcept;
+        [[nodiscard]] SGroupedPageFlipResult    routeGroupedPageFlip(const CWeakPointer<CDRMBackend>& backend, uintptr_t transactionId, uint32_t crtcId, uint32_t sequence,
+                                                                     uint64_t timestampNs) noexcept;
 
         [[nodiscard]] eSessionResult            rotateSession(const CWeakPointer<CDRMBackend>& backend) noexcept;
         [[nodiscard]] eDetachResult             beginDetach(const CWeakPointer<CDRMBackend>& backend, eDetachReason reason) noexcept;
@@ -246,7 +250,8 @@ namespace Aquamarine::NDRM::NTiledDRMIntegration { // NOLINT(readability-identif
                                                                          const std::function<void(const CPlan&, const SCurrentState&)>& callback) noexcept;
         [[nodiscard]] bool                      withCurrentOutputBridgeKey(const void* key, const PAllocationShadow& expected,
                                                                            const std::function<void(const POutputBridgeObservation&)>& callback) noexcept;
-        void                                    abortConnectorScan(CConnectorScan& scan) noexcept;
+        [[nodiscard]] SGroupedPageFlipResult routeGroupedPageFlipKey(const void* key, uintptr_t transactionId, uint32_t crtcId, uint32_t sequence, uint64_t timestampNs) noexcept;
+        void                                 abortConnectorScan(CConnectorScan& scan) noexcept;
 
         [[nodiscard]] SBeginConnectorScanResult beginTestConnectorScan(const PBackendLifetime& lifetime);
         [[nodiscard]] eSessionResult            rotateTestSession(const PBackendLifetime& lifetime) noexcept;
@@ -283,6 +288,8 @@ namespace Aquamarine::NDRM::NTiledDRMIntegration { // NOLINT(readability-identif
                                                                                              const std::function<void(const CPlan&, const SCurrentState&)>& callback) noexcept;
     [[nodiscard]] AQ_TILED_DRM_PRIVATE bool                      withCurrentOutputBridge(const CWeakPointer<CDRMBackend>& backend, const PAllocationShadow& expected,
                                                                                          const std::function<void(const POutputBridgeObservation&)>& callback) noexcept;
+    [[nodiscard]] AQ_TILED_DRM_PRIVATE SGroupedPageFlipResult    routeGroupedPageFlip(const CWeakPointer<CDRMBackend>& backend, uintptr_t transactionId, uint32_t crtcId,
+                                                                                      uint32_t sequence, uint64_t timestampNs) noexcept;
     [[nodiscard]] AQ_TILED_DRM_PRIVATE eSessionResult            rotateSession(const CWeakPointer<CDRMBackend>& backend) noexcept;
     [[nodiscard]] AQ_TILED_DRM_PRIVATE eDetachResult             beginDetach(const CWeakPointer<CDRMBackend>& backend, eDetachReason reason) noexcept;
     [[nodiscard]] AQ_TILED_DRM_PRIVATE eDetachResult             eraseDetached(const CWeakPointer<CDRMBackend>& backend) noexcept;
diff --git a/src/backend/drm/TiledOutputBridge.cpp b/src/backend/drm/TiledOutputBridge.cpp
index f014822b0ca8c9e7feaa5b85d0f3e70815a6752e..b2bf772b43b15067e07787fdc0d3583b8bb3b229 100644
--- a/src/backend/drm/TiledOutputBridge.cpp
+++ b/src/backend/drm/TiledOutputBridge.cpp
@@ -536,7 +536,8 @@ namespace Aquamarine::NDRM::NTiledOutputBridge { // NOLINT(readability-identifie
             return {.result = ePrepareResult::WRONG_THREAD};
 
         try {
-            auto built = COutputBridgeAssembler::build(plan, m_installed);
+            const auto& PREVIOUS = m_installed ? m_installed : m_reconciliationBase;
+            auto        built    = COutputBridgeAssembler::build(plan, PREVIOUS);
             if (!built.observation) {
                 return {.result = built.error == eBuildError::INVALID_CHAIN ? ePrepareResult::INVALID_CHAIN : ePrepareResult::INVALID_PROJECTION};
             }
@@ -564,8 +565,9 @@ namespace Aquamarine::NDRM::NTiledOutputBridge { // NOLINT(readability-identifie
             void                                           operator()(const CPlan&) noexcept {
                 if (std::ranges::any_of(candidate->groups(), [](const auto& group) { return group.modeSet() && !modeOwnersMatchDefinition(*group.modeSet()); }))
                     return;
-                state->m_installed = std::move(candidate);
-                installed          = true;
+                state->m_installed          = std::move(candidate);
+                state->m_reconciliationBase = state->m_installed;
+                installed                   = true;
             }
         };
 
@@ -598,6 +600,8 @@ namespace Aquamarine::NDRM::NTiledOutputBridge { // NOLINT(readability-identifie
     bool COutputBridgeState::clear() noexcept {
         if (!onEventThread())
             return false;
+        if (m_installed)
+            m_reconciliationBase = m_installed;
         m_installed = {};
         return true;
     }
diff --git a/src/backend/drm/TiledOutputBridge.hpp b/src/backend/drm/TiledOutputBridge.hpp
index caa521e296f0c000d5552653fcd00e8ba638924b..367c68d304464c3a328a01a98be0f63510f71bdd 100644
--- a/src/backend/drm/TiledOutputBridge.hpp
+++ b/src/backend/drm/TiledOutputBridge.hpp
@@ -272,6 +272,10 @@ namespace Aquamarine::NDRM::NTiledOutputBridge { // NOLINT(readability-identifie
         std::thread::id                                m_eventThread;
         CSharedPointer<COutputBridgeStateAuthority>    m_authority;
         CSharedPointer<const COutputBridgeObservation> m_installed;
+        // Retained only so the next complete observation can reuse bridge-minted
+        // semantic identities and public mode owners. It is never consulted by
+        // withCurrent(), withCurrentOwner(), or diagnosticInstalled().
+        CSharedPointer<const COutputBridgeObservation> m_reconciliationBase;
     };
 }
 
diff --git a/src/backend/drm/TiledRuntimeAuthority.cpp b/src/backend/drm/TiledRuntimeAuthority.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..7cda6afdfc829eab82d46fe33001f70b1466a19b
--- /dev/null
+++ b/src/backend/drm/TiledRuntimeAuthority.cpp
@@ -0,0 +1,464 @@
+#include "TiledRuntimeAuthority.hpp"
+
+#include <algorithm>
+#include <exception>
+#include <ranges>
+#include <utility>
+
+#include <hyprutils/utils/ScopeGuard.hpp>
+
+using namespace Aquamarine;
+using namespace Aquamarine::NDRM;
+using namespace Aquamarine::NDRM::NTiledAtomic;
+using namespace Aquamarine::NDRM::NTiledOutputBridge;
+using namespace Aquamarine::NDRM::NTiledRuntimeAuthority;
+
+namespace {
+    template <typename T, typename U>
+    bool sameOwner(const Hyprutils::Memory::CSharedPointer<T>& lhs, const Hyprutils::Memory::CSharedPointer<U>& rhs) noexcept {
+        return lhs.impl_ != nullptr && lhs.impl_ == rhs.impl_;
+    }
+}
+
+CGroupedFrameOwner::CGroupedFrameOwner(PResolvedTiledAtomicRoute route, CSharedPointer<CDRMFB> framebuffer, CSharedPointer<IBuffer> buffer) noexcept :
+    m_route(std::move(route)), m_framebuffer(std::move(framebuffer)), m_buffer(std::move(buffer)) {}
+
+const PResolvedTiledAtomicRoute& CGroupedFrameOwner::route() const noexcept {
+    return m_route;
+}
+
+const CSharedPointer<CDRMFB>& CGroupedFrameOwner::framebuffer() const noexcept {
+    return m_framebuffer;
+}
+
+const CSharedPointer<IBuffer>& CGroupedFrameOwner::buffer() const noexcept {
+    return m_buffer;
+}
+
+PGroupedFrameOwner::PGroupedFrameOwner(CSharedPointer<const CGroupedFrameOwner> owner) noexcept : m_owner(std::move(owner)) {}
+
+PGroupedFrameOwner::operator bool() const noexcept {
+    return static_cast<bool>(m_owner);
+}
+
+const CGroupedFrameOwner* PGroupedFrameOwner::get() const noexcept {
+    return m_owner.get();
+}
+
+const CSharedPointer<const CGroupedFrameOwner>& PGroupedFrameOwner::owner() const noexcept {
+    return m_owner;
+}
+
+SGroupedReconcileResult::operator bool() const noexcept {
+    return result == eGroupedReconcileResult::RECONCILED || result == eGroupedReconcileResult::RECONCILED_WITH_QUIESCE;
+}
+
+CGroupedRuntimeAuthority::CGroupedRuntimeAuthority(std::thread::id eventThread) : m_eventThread(eventThread) {}
+
+CGroupedRuntimeAuthority::~CGroupedRuntimeAuthority() noexcept {
+    if (!readyForDestruction())
+        std::terminate();
+}
+
+bool CGroupedRuntimeAuthority::onEventThread() const noexcept {
+    return std::this_thread::get_id() == m_eventThread;
+}
+
+bool CGroupedRuntimeAuthority::exactCurrentRoute(const POutputBridgeObservation& current, const PResolvedTiledAtomicRoute& route) const noexcept {
+    if (!current || !route || !sameOwner(current, route->generationOwner()) || !route->groupDefinition() || !route->definitionIdentity() || !route->modeSet() ||
+        !route->outputMode())
+        return false;
+
+    const auto& SNAPSHOT = current->capturedSnapshot();
+    const auto* GROUP    = current->findGroup(route->groupDefinition());
+    if (!SNAPSHOT || route->generation() == 0 || SNAPSHOT->allocationEpoch() != route->generation() || !GROUP || GROUP->projection() != eGroupProjection::MULTI_STREAM_ALLOCATED ||
+        !sameOwner(GROUP->definitionIdentity(), route->definitionIdentity()) || !sameOwner(GROUP->allocationDefinition(), route->allocationDefinition()) ||
+        !sameOwner(GROUP->modeSet(), route->modeSet()))
+        return false;
+
+    return GROUP->modeSet()->physicalMappingFor(route->outputMode()) != nullptr;
+}
+
+CGroupedRuntimeAuthority::SRuntimeRecord* CGroupedRuntimeAuthority::recordFor(const POutputDefinitionIdentity& identity) noexcept {
+    if (!identity)
+        return nullptr;
+    const auto RECORD = m_runtimes.find(identity.impl_);
+    return RECORD == m_runtimes.end() ? nullptr : &RECORD->second;
+}
+
+const CGroupedRuntimeAuthority::SRuntimeRecord* CGroupedRuntimeAuthority::recordFor(const POutputDefinitionIdentity& identity) const noexcept {
+    if (!identity)
+        return nullptr;
+    const auto RECORD = m_runtimes.find(identity.impl_);
+    return RECORD == m_runtimes.end() ? nullptr : &RECORD->second;
+}
+
+bool CGroupedRuntimeAuthority::applyReservationEffects(const CGroupedRuntime::SEffects& effects) noexcept {
+    const bool NEEDS_RESERVATION = effects.rollbackReservation || effects.quiesceReservation || effects.retireReservation;
+    if (NEEDS_RESERVATION && !effects.reservation)
+        return false;
+    if (effects.rollbackReservation && !m_reservations.rollback(*effects.reservation))
+        return false;
+    if (effects.quiesceReservation && !m_reservations.quiesce(*effects.reservation))
+        return false;
+    if (effects.retireReservation && !m_reservations.retire(*effects.reservation))
+        return false;
+    return true;
+}
+
+bool CGroupedRuntimeAuthority::synchronizeRoute(SRuntimeRecord& record) noexcept {
+    if (!record.runtime || !record.activeRoute)
+        return false;
+    const auto& ACTIVE_OWNER = record.runtime->activePlan().generationOwner;
+    if (sameOwner(ACTIVE_OWNER, record.activeRoute->generationOwner()))
+        return true;
+    if (!record.successorRoute || !sameOwner(ACTIVE_OWNER, record.successorRoute->generationOwner()))
+        return false;
+    record.activeRoute    = std::move(record.successorRoute);
+    record.successorRoute = {};
+    return true;
+}
+
+eGroupedStageResult CGroupedRuntimeAuthority::stageRecord(const POutputBridgeObservation& current, const PResolvedTiledAtomicRoute& route) {
+    if (!exactCurrentRoute(current, route))
+        return current && route && !sameOwner(current, route->generationOwner()) ? eGroupedStageResult::FOREIGN_ROUTE : eGroupedStageResult::INVALID_CURRENT;
+
+    const auto& IDENTITY  = route->definitionIdentity();
+    const auto  GROUP_KEY = route->groupDefinition()->group().key;
+    auto*       RECORD    = recordFor(IDENTITY);
+
+    if (!RECORD) {
+        for (auto ITERATOR = m_runtimes.begin(); ITERATOR != m_runtimes.end();) {
+            if (ITERATOR->second.groupKey != GROUP_KEY) {
+                ++ITERATOR;
+                continue;
+            }
+
+            auto effects = ITERATOR->second.runtime->quiesce(eTiledQuiesceReason::INVALID_TOPOLOGY);
+            if (!applyReservationEffects(effects) || !ITERATOR->second.runtime->readyForDestruction())
+                return eGroupedStageResult::GROUP_CONFLICT;
+            ITERATOR = m_runtimes.erase(ITERATOR);
+        }
+
+        auto runtime = Hyprutils::Memory::makeUnique<CGroupedRuntime>(route->runtimePlan<PGroupedFrameOwner>());
+        if (!runtime || !runtime->valid())
+            return eGroupedStageResult::INVALID_CURRENT;
+        m_runtimes.emplace(IDENTITY.impl_,
+                           SRuntimeRecord{
+                               .identity    = IDENTITY,
+                               .groupKey    = GROUP_KEY,
+                               .activeRoute = route,
+                               .runtime     = std::move(runtime),
+                           });
+        return eGroupedStageResult::STAGED;
+    }
+
+    if (!sameOwner(RECORD->identity, IDENTITY) || RECORD->groupKey != GROUP_KEY || !synchronizeRoute(*RECORD))
+        return eGroupedStageResult::GROUP_CONFLICT;
+    if (sameOwner(RECORD->activeRoute->generationOwner(), current) || (RECORD->successorRoute && sameOwner(RECORD->successorRoute->generationOwner(), current)))
+        return eGroupedStageResult::UNCHANGED;
+
+    auto transition = RECORD->runtime->stageSuccessor(route->runtimePlan<PGroupedFrameOwner>());
+    if (!applyReservationEffects(transition.effects))
+        return eGroupedStageResult::NON_EQUIVALENT;
+
+    switch (transition.result) {
+        case eTiledSuccessorResult::ADOPTED:
+            RECORD->activeRoute    = route;
+            RECORD->successorRoute = {};
+            return eGroupedStageResult::SUCCESSOR_ADOPTED;
+        case eTiledSuccessorResult::STAGED: RECORD->successorRoute = route; return eGroupedStageResult::SUCCESSOR_STAGED;
+        case eTiledSuccessorResult::NON_EQUIVALENT: return eGroupedStageResult::NON_EQUIVALENT;
+        case eTiledSuccessorResult::STALE_GENERATION:
+        case eTiledSuccessorResult::INVALID_PLAN:
+        case eTiledSuccessorResult::INVALID_STATE: return eGroupedStageResult::INVALID_CURRENT;
+    }
+    return eGroupedStageResult::INVALID_CURRENT;
+}
+
+eGroupedStageResult CGroupedRuntimeAuthority::stageCurrent(const POutputBridgeObservation& current, const PResolvedTiledAtomicRoute& route) noexcept {
+    if (!onEventThread())
+        return eGroupedStageResult::WRONG_THREAD;
+    if (m_mutationActive)
+        return eGroupedStageResult::BUSY;
+    if (m_terminal)
+        return eGroupedStageResult::TERMINAL;
+
+    m_mutationActive = true;
+    Hyprutils::Utils::CScopeGuard mutationGuard([&] { m_mutationActive = false; });
+    try {
+        return stageRecord(current, route);
+    } catch (...) { return eGroupedStageResult::ALLOCATION_FAILED; }
+}
+
+SGroupedReconcileResult CGroupedRuntimeAuthority::reconcileCurrent(const POutputBridgeObservation& current) noexcept {
+    if (!onEventThread())
+        return {.result = eGroupedReconcileResult::WRONG_THREAD};
+    if (m_mutationActive)
+        return {.result = eGroupedReconcileResult::BUSY};
+    if (m_terminal)
+        return {.result = eGroupedReconcileResult::TERMINAL};
+    if (!current || !current->capturedPlan() || !current->capturedSnapshot())
+        return {.result = eGroupedReconcileResult::INVALID_CURRENT};
+
+    m_mutationActive = true;
+    Hyprutils::Utils::CScopeGuard mutationGuard([&] { m_mutationActive = false; });
+    SGroupedReconcileResult       result{.result = eGroupedReconcileResult::RECONCILED};
+
+    try {
+        for (auto& [KEY, RECORD] : m_runtimes) {
+            static_cast<void>(KEY);
+            if (!RECORD.runtime || !RECORD.activeRoute || !synchronizeRoute(RECORD)) {
+                if (RECORD.runtime) {
+                    const auto EFFECTS = RECORD.runtime->quiesce(eTiledQuiesceReason::INVALID_TOPOLOGY);
+                    static_cast<void>(applyReservationEffects(EFFECTS));
+                }
+                result.result = eGroupedReconcileResult::RECONCILED_WITH_QUIESCE;
+                ++result.quiesced;
+                continue;
+            }
+            if (sameOwner(RECORD.activeRoute->generationOwner(), current) || (RECORD.successorRoute && sameOwner(RECORD.successorRoute->generationOwner(), current))) {
+                ++result.unchanged;
+                continue;
+            }
+
+            const CGroupProjection* MATCH = nullptr;
+            for (const auto& GROUP : current->groups()) {
+                if (!sameOwner(GROUP.definitionIdentity(), RECORD.identity))
+                    continue;
+                if (MATCH) {
+                    MATCH = nullptr;
+                    break;
+                }
+                MATCH = &GROUP;
+            }
+            if (!MATCH || MATCH->projection() != eGroupProjection::MULTI_STREAM_ALLOCATED || !MATCH->scanDefinition()) {
+                const auto EFFECTS = RECORD.runtime->quiesce(eTiledQuiesceReason::CRTC_REASSIGNED);
+                static_cast<void>(applyReservationEffects(EFFECTS));
+                result.result = eGroupedReconcileResult::RECONCILED_WITH_QUIESCE;
+                ++result.quiesced;
+                continue;
+            }
+
+            const auto& BASE_ROUTE = RECORD.successorRoute ? RECORD.successorRoute : RECORD.activeRoute;
+            const auto  RESOLVED   = resolveCapturedTiledAtomic({
+                .generationOwner    = current,
+                .groupDefinition    = MATCH->scanDefinition(),
+                .definitionIdentity = MATCH->definitionIdentity(),
+                .outputMode         = BASE_ROUTE->outputMode(),
+                .framebuffer        = BASE_ROUTE->framebuffer(),
+            });
+            if (!RESOLVED) {
+                const auto EFFECTS = RECORD.runtime->quiesce(eTiledQuiesceReason::INVALID_TOPOLOGY);
+                static_cast<void>(applyReservationEffects(EFFECTS));
+                result.result = eGroupedReconcileResult::RECONCILED_WITH_QUIESCE;
+                ++result.quiesced;
+                continue;
+            }
+
+            switch (stageRecord(current, RESOLVED.route)) {
+                case eGroupedStageResult::UNCHANGED: ++result.unchanged; break;
+                case eGroupedStageResult::SUCCESSOR_STAGED: ++result.staged; break;
+                case eGroupedStageResult::SUCCESSOR_ADOPTED: ++result.adopted; break;
+                default: {
+                    const auto EFFECTS = RECORD.runtime->quiesce(eTiledQuiesceReason::INVALID_TOPOLOGY);
+                    static_cast<void>(applyReservationEffects(EFFECTS));
+                    result.result = eGroupedReconcileResult::RECONCILED_WITH_QUIESCE;
+                    ++result.quiesced;
+                    break;
+                }
+            }
+        }
+    } catch (...) {
+        const auto QUIESCED = quiesceAllUnguarded(eTiledQuiesceReason::INVALID_TOPOLOGY);
+        result.result       = eGroupedReconcileResult::RECONCILED_WITH_QUIESCE;
+        result.quiesced += QUIESCED.quiesced;
+    }
+    return result;
+}
+
+SGroupedQuiesceResult CGroupedRuntimeAuthority::quiesceAllUnguarded(eTiledQuiesceReason reason) noexcept {
+    SGroupedQuiesceResult result;
+    for (auto& [KEY, RECORD] : m_runtimes) {
+        static_cast<void>(KEY);
+        if (!RECORD.runtime) {
+            result.invariantFailed = true;
+            continue;
+        }
+        const auto BEFORE  = RECORD.runtime->state();
+        const auto EFFECTS = RECORD.runtime->quiesce(reason);
+        if (!applyReservationEffects(EFFECTS))
+            result.invariantFailed = true;
+        if (BEFORE != eTiledRuntimeState::QUIESCED && BEFORE != eTiledRuntimeState::TEARDOWN && RECORD.runtime->state() == eTiledRuntimeState::QUIESCED)
+            ++result.quiesced;
+        if (!synchronizeRoute(RECORD))
+            result.invariantFailed = true;
+    }
+    return result;
+}
+
+SGroupedQuiesceResult CGroupedRuntimeAuthority::quiesceAll(eTiledQuiesceReason reason) noexcept {
+    if (!onEventThread() || m_mutationActive || m_terminal || reason == eTiledQuiesceReason::NONE)
+        return {.invariantFailed = true};
+    m_mutationActive = true;
+    Hyprutils::Utils::CScopeGuard mutationGuard([&] { m_mutationActive = false; });
+    return quiesceAllUnguarded(reason);
+}
+
+SGroupedRetirementResult CGroupedRuntimeAuthority::retireUnguarded(SRuntimeRecord& record, eTiledRetirementProof proof) {
+    SGroupedRetirementResult result;
+    if (!record.runtime)
+        return {.invariantFailed = true};
+
+    auto retired   = record.runtime->retire(proof);
+    result.retired = retired.retired;
+    if (!retired.retired)
+        return result;
+    if (retired.retireReservation) {
+        if (!retired.reservation || !m_reservations.retire(*retired.reservation))
+            result.invariantFailed = true;
+        else
+            result.reservationRetired = true;
+    }
+    result.releases = std::move(retired.releases);
+    if (record.runtime->state() == eTiledRuntimeState::TEARDOWN) {
+        record.activeRoute    = {};
+        record.successorRoute = {};
+    } else if (!synchronizeRoute(record)) {
+        result.invariantFailed = true;
+    }
+    return result;
+}
+
+SGroupedRetirementResult CGroupedRuntimeAuthority::retire(const POutputDefinitionIdentity& identity, eTiledRetirementProof proof) noexcept {
+    if (!onEventThread() || m_mutationActive || m_terminal || proof == eTiledRetirementProof::NONE)
+        return {.invariantFailed = true};
+    auto* const RECORD = recordFor(identity);
+    if (!RECORD)
+        return {.invariantFailed = true};
+
+    m_mutationActive = true;
+    Hyprutils::Utils::CScopeGuard mutationGuard([&] { m_mutationActive = false; });
+    try {
+        return retireUnguarded(*RECORD, proof);
+    } catch (...) { return {.invariantFailed = true}; }
+}
+
+SGroupedPageFlipResult CGroupedRuntimeAuthority::routePageFlip(uintptr_t transactionId, uint32_t crtcId, uint32_t sequence, uint64_t timestampNs) noexcept {
+    if (!onEventThread())
+        return {.claimed = transactionId != 0, .disposition = eGroupedPageFlipDisposition::WRONG_THREAD};
+    if (m_mutationActive)
+        return {.claimed = transactionId != 0, .disposition = eGroupedPageFlipDisposition::BUSY};
+    if (m_terminal)
+        return {.claimed = transactionId != 0, .disposition = eGroupedPageFlipDisposition::TERMINAL};
+
+    m_mutationActive = true;
+    Hyprutils::Utils::CScopeGuard mutationGuard([&] { m_mutationActive = false; });
+    const auto                    ROUTE = m_reservations.routeEvent(transactionId, crtcId);
+    if (ROUTE == eTiledRouteEventResult::NOT_OWNED)
+        return {};
+    if (ROUTE == eTiledRouteEventResult::RESERVED)
+        return {.claimed = true, .disposition = eGroupedPageFlipDisposition::RESERVED};
+    if (ROUTE == eTiledRouteEventResult::STALE_TOKEN)
+        return {.claimed = true, .disposition = eGroupedPageFlipDisposition::STALE};
+
+    SRuntimeRecord* OWNER = nullptr;
+    for (auto& [KEY, RECORD] : m_runtimes) {
+        static_cast<void>(KEY);
+        const auto* PREPARED = RECORD.runtime ? RECORD.runtime->preparedRoute() : nullptr;
+        if (!PREPARED || PREPARED->transactionId != transactionId)
+            continue;
+        if (OWNER) {
+            const auto FIRST_EFFECTS  = OWNER->runtime->quiesce(eTiledQuiesceReason::EVENT_INVARIANT);
+            const auto SECOND_EFFECTS = RECORD.runtime->quiesce(eTiledQuiesceReason::EVENT_INVARIANT);
+            static_cast<void>(applyReservationEffects(FIRST_EFFECTS));
+            static_cast<void>(applyReservationEffects(SECOND_EFFECTS));
+            return {.claimed = true, .disposition = eGroupedPageFlipDisposition::INVARIANT_FAILURE};
+        }
+        OWNER = &RECORD;
+    }
+    if (!OWNER)
+        return {.claimed = true, .disposition = eGroupedPageFlipDisposition::INVARIANT_FAILURE};
+
+    if (ROUTE == eTiledRouteEventResult::UNEXPECTED_CRTC) {
+        auto effects = OWNER->runtime->quiesce(eTiledQuiesceReason::EVENT_INVARIANT);
+        static_cast<void>(applyReservationEffects(effects));
+        SGroupedPageFlipResult result{
+            .claimed            = true,
+            .disposition        = eGroupedPageFlipDisposition::INVARIANT_FAILURE,
+            .definitionIdentity = OWNER->identity,
+            .route              = OWNER->activeRoute,
+        };
+        result.runtimeEffects = std::move(effects);
+        return result;
+    }
+
+    SGroupedPageFlipResult result{
+        .claimed            = true,
+        .definitionIdentity = OWNER->identity,
+        .route              = OWNER->activeRoute,
+    };
+    auto       effects                     = OWNER->runtime->record(transactionId, crtcId, sequence, timestampNs);
+    const bool RESERVATION_EFFECTS_APPLIED = applyReservationEffects(effects);
+    result.reservationRetired              = effects.retireReservation && RESERVATION_EFFECTS_APPLIED;
+
+    switch (effects.disposition) {
+        case eTiledEventDisposition::RECORDED: result.disposition = eGroupedPageFlipDisposition::RECORDED; break;
+        case eTiledEventDisposition::COMPLETED: result.disposition = eGroupedPageFlipDisposition::COMPLETED; break;
+        case eTiledEventDisposition::QUIESCED: result.disposition = eGroupedPageFlipDisposition::QUIESCED; break;
+        case eTiledEventDisposition::STALE:
+        case eTiledEventDisposition::DUPLICATE:
+        case eTiledEventDisposition::ALREADY_COMPLETE: result.disposition = eGroupedPageFlipDisposition::STALE; break;
+        default: result.disposition = eGroupedPageFlipDisposition::INVARIANT_FAILURE; break;
+    }
+    if (!RESERVATION_EFFECTS_APPLIED || !synchronizeRoute(*OWNER))
+        result.disposition = eGroupedPageFlipDisposition::INVARIANT_FAILURE;
+    result.runtimeEffects = std::move(effects);
+    return result;
+}
+
+bool CGroupedRuntimeAuthority::terminalShutdown(eTiledRegistryShutdownProof registryProof, eTiledRetirementProof runtimeProof) noexcept {
+    if (!onEventThread() || m_mutationActive)
+        return false;
+    if (m_terminal)
+        return readyForDestruction();
+    const bool DEVICE_GONE  = registryProof == eTiledRegistryShutdownProof::DRM_DEVICE_GONE && runtimeProof == eTiledRetirementProof::DRM_DEVICE_GONE;
+    const bool NO_CALLBACKS = registryProof == eTiledRegistryShutdownProof::BACKEND_NO_CALLBACKS && runtimeProof == eTiledRetirementProof::BACKEND_TEARDOWN_NO_CALLBACKS;
+    if (!DEVICE_GONE && !NO_CALLBACKS)
+        return false;
+
+    m_mutationActive = true;
+    Hyprutils::Utils::CScopeGuard mutationGuard([&] { m_mutationActive = false; });
+    try {
+        const auto QUIESCED = quiesceAllUnguarded(eTiledQuiesceReason::BACKEND_TEARDOWN);
+        if (QUIESCED.invariantFailed)
+            return false;
+        for (auto& [KEY, RECORD] : m_runtimes) {
+            static_cast<void>(KEY);
+            if (RECORD.runtime->state() != eTiledRuntimeState::TEARDOWN) {
+                const auto RETIRED = retireUnguarded(RECORD, runtimeProof);
+                if (!RETIRED.retired || RETIRED.invariantFailed)
+                    return false;
+            }
+            if (!RECORD.runtime->readyForDestruction())
+                return false;
+        }
+        if (!m_reservations.shutdown(registryProof))
+            return false;
+        m_terminal = true;
+        return readyForDestruction();
+    } catch (...) { return false; }
+}
+
+bool CGroupedRuntimeAuthority::busy() const noexcept {
+    return m_mutationActive;
+}
+
+bool CGroupedRuntimeAuthority::readyForDestruction() const noexcept {
+    return m_reservations.readyForDestruction() &&
+        std::ranges::all_of(m_runtimes, [](const auto& entry) { return entry.second.runtime && entry.second.runtime->readyForDestruction(); });
+}
+
+size_t CGroupedRuntimeAuthority::runtimeCount() const noexcept {
+    return m_runtimes.size();
+}
diff --git a/src/backend/drm/TiledRuntimeAuthority.hpp b/src/backend/drm/TiledRuntimeAuthority.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..73415d501a3057f5db158f5732cfafa1ccf8321e
--- /dev/null
+++ b/src/backend/drm/TiledRuntimeAuthority.hpp
@@ -0,0 +1,208 @@
+#pragma once
+
+#include "TiledAtomic.hpp"
+
+#include <aquamarine/backend/DRM.hpp>
+
+#include <cstddef>
+#include <cstdint>
+#include <map>
+#include <thread>
+#include <vector>
+
+#include <hyprutils/memory/SharedPtr.hpp>
+#include <hyprutils/memory/UniquePtr.hpp>
+
+#ifdef __GNUC__
+#define AQ_TILED_RUNTIME_AUTHORITY_PRIVATE __attribute__((visibility("hidden")))
+#else
+#define AQ_TILED_RUNTIME_AUTHORITY_PRIVATE
+#endif
+
+namespace Aquamarine::NDRM::NTiledRuntimeAuthorityTest {
+    class CFixtureAuthority;
+}
+
+namespace Aquamarine::NDRM::NTiledRuntimeAuthority { // NOLINT(readability-identifier-naming): established Aquamarine DRM namespace
+    using Hyprutils::Memory::CSharedPointer;
+    using Hyprutils::Memory::CUniquePointer;
+    using NTiledAtomic::PResolvedTiledAtomicRoute;
+    using NTiledOutputBridge::POutputBridgeObservation;
+    using NTiledOutputBridge::POutputDefinitionIdentity;
+
+    // One retained frame owner for the grouped runtime. The route preserves the
+    // exact bridge/allocation/incarnation chain; future production activation
+    // must additionally provide the exact DRM FB and underlying buffer owners.
+    class AQ_TILED_RUNTIME_AUTHORITY_PRIVATE CGroupedFrameOwner final {
+      public:
+        CGroupedFrameOwner(const CGroupedFrameOwner&)                                       = delete;
+        CGroupedFrameOwner(CGroupedFrameOwner&&)                                            = delete;
+        CGroupedFrameOwner&                            operator=(const CGroupedFrameOwner&) = delete;
+        CGroupedFrameOwner&                            operator=(CGroupedFrameOwner&&)      = delete;
+
+        [[nodiscard]] const PResolvedTiledAtomicRoute& route() const noexcept;
+        [[nodiscard]] const CSharedPointer<CDRMFB>&    framebuffer() const noexcept;
+        [[nodiscard]] const CSharedPointer<IBuffer>&   buffer() const noexcept;
+
+      private:
+        CGroupedFrameOwner(PResolvedTiledAtomicRoute route, CSharedPointer<CDRMFB> framebuffer, CSharedPointer<IBuffer> buffer) noexcept;
+
+        PResolvedTiledAtomicRoute m_route;
+        CSharedPointer<CDRMFB>    m_framebuffer;
+        CSharedPointer<IBuffer>   m_buffer;
+
+        friend class CGroupedRuntimeAuthority;
+        friend class ::Aquamarine::NDRM::NTiledRuntimeAuthorityTest::CFixtureAuthority;
+    };
+
+    // Hyprutils' shared-pointer get() is not declared noexcept, while the
+    // runtime intentionally requires a nothrow opaque owner handle. This small
+    // wrapper keeps the exact shared owner and exposes only the required seam.
+    class AQ_TILED_RUNTIME_AUTHORITY_PRIVATE PGroupedFrameOwner final { // NOLINT(readability-identifier-naming): pointer-like nothrow owner handle
+      public:
+        PGroupedFrameOwner() noexcept                                                                          = default;
+        PGroupedFrameOwner(const PGroupedFrameOwner&)                                                          = default;
+        PGroupedFrameOwner(PGroupedFrameOwner&&) noexcept                                                      = default;
+        PGroupedFrameOwner&                                           operator=(const PGroupedFrameOwner&)     = default;
+        PGroupedFrameOwner&                                           operator=(PGroupedFrameOwner&&) noexcept = default;
+
+        [[nodiscard]] explicit                                        operator bool() const noexcept;
+        [[nodiscard]] const CGroupedFrameOwner*                       get() const noexcept;
+        [[nodiscard]] const CSharedPointer<const CGroupedFrameOwner>& owner() const noexcept;
+
+      private:
+        explicit PGroupedFrameOwner(CSharedPointer<const CGroupedFrameOwner> owner) noexcept;
+
+        CSharedPointer<const CGroupedFrameOwner> m_owner;
+
+        friend class CGroupedRuntimeAuthority;
+        friend class ::Aquamarine::NDRM::NTiledRuntimeAuthorityTest::CFixtureAuthority;
+    };
+
+    using CGroupedRuntime = CTiledFrameRuntime<PGroupedFrameOwner>;
+
+    enum class eGroupedStageResult : uint8_t {
+        STAGED = 0,
+        SUCCESSOR_STAGED,
+        SUCCESSOR_ADOPTED,
+        UNCHANGED,
+        WRONG_THREAD,
+        BUSY,
+        TERMINAL,
+        INVALID_CURRENT,
+        FOREIGN_ROUTE,
+        NOT_ALLOCATED,
+        GROUP_CONFLICT,
+        NON_EQUIVALENT,
+        ALLOCATION_FAILED,
+    };
+
+    enum class eGroupedReconcileResult : uint8_t {
+        RECONCILED = 0,
+        RECONCILED_WITH_QUIESCE,
+        WRONG_THREAD,
+        BUSY,
+        TERMINAL,
+        INVALID_CURRENT,
+    };
+
+    struct AQ_TILED_RUNTIME_AUTHORITY_PRIVATE SGroupedReconcileResult {
+        eGroupedReconcileResult result    = eGroupedReconcileResult::INVALID_CURRENT;
+        size_t                  unchanged = 0;
+        size_t                  staged    = 0;
+        size_t                  adopted   = 0;
+        size_t                  quiesced  = 0;
+
+        explicit                operator bool() const noexcept;
+    };
+
+    struct AQ_TILED_RUNTIME_AUTHORITY_PRIVATE SGroupedQuiesceResult {
+        size_t quiesced        = 0;
+        bool   invariantFailed = false;
+    };
+
+    struct AQ_TILED_RUNTIME_AUTHORITY_PRIVATE SGroupedRetirementResult {
+        bool                                   retired            = false;
+        bool                                   reservationRetired = false;
+        bool                                   invariantFailed    = false;
+        std::vector<CGroupedRuntime::SRelease> releases;
+    };
+
+    enum class eGroupedPageFlipDisposition : uint8_t {
+        NOT_OWNED = 0,
+        RESERVED,
+        RECORDED,
+        COMPLETED,
+        STALE,
+        QUIESCED,
+        INVARIANT_FAILURE,
+        BUSY,
+        WRONG_THREAD,
+        TERMINAL,
+    };
+
+    struct AQ_TILED_RUNTIME_AUTHORITY_PRIVATE SGroupedPageFlipResult {
+        bool                        claimed     = false;
+        eGroupedPageFlipDisposition disposition = eGroupedPageFlipDisposition::NOT_OWNED;
+        POutputDefinitionIdentity   definitionIdentity;
+        PResolvedTiledAtomicRoute   route;
+        CGroupedRuntime::SEffects   runtimeEffects;
+        bool                        reservationRetired = false;
+    };
+
+    // Event-thread-only per-backend authority. No method publishes outputs or
+    // performs an ioctl; production runtime creation remains impossible until a
+    // later activation path supplies an exact current resolved route.
+    class AQ_TILED_RUNTIME_AUTHORITY_PRIVATE CGroupedRuntimeAuthority final {
+      public:
+        explicit CGroupedRuntimeAuthority(std::thread::id eventThread = std::this_thread::get_id());
+        ~CGroupedRuntimeAuthority() noexcept;
+
+        CGroupedRuntimeAuthority(const CGroupedRuntimeAuthority&)                         = delete;
+        CGroupedRuntimeAuthority(CGroupedRuntimeAuthority&&)                              = delete;
+        CGroupedRuntimeAuthority&              operator=(const CGroupedRuntimeAuthority&) = delete;
+        CGroupedRuntimeAuthority&              operator=(CGroupedRuntimeAuthority&&)      = delete;
+
+        [[nodiscard]] eGroupedStageResult      stageCurrent(const POutputBridgeObservation& current, const PResolvedTiledAtomicRoute& route) noexcept;
+        [[nodiscard]] SGroupedReconcileResult  reconcileCurrent(const POutputBridgeObservation& current) noexcept;
+        [[nodiscard]] SGroupedPageFlipResult   routePageFlip(uintptr_t transactionId, uint32_t crtcId, uint32_t sequence, uint64_t timestampNs) noexcept;
+        [[nodiscard]] SGroupedQuiesceResult    quiesceAll(eTiledQuiesceReason reason) noexcept;
+        [[nodiscard]] SGroupedRetirementResult retire(const POutputDefinitionIdentity& identity, eTiledRetirementProof proof) noexcept;
+
+        [[nodiscard]] bool                     terminalShutdown(eTiledRegistryShutdownProof registryProof, eTiledRetirementProof runtimeProof) noexcept;
+        [[nodiscard]] bool                     busy() const noexcept;
+        [[nodiscard]] bool                     readyForDestruction() const noexcept;
+        [[nodiscard]] size_t                   runtimeCount() const noexcept;
+
+      private:
+        struct SRuntimeRecord {
+            POutputDefinitionIdentity       identity;
+            NTiling::STileGroupKey          groupKey;
+            PResolvedTiledAtomicRoute       activeRoute;
+            PResolvedTiledAtomicRoute       successorRoute;
+            CUniquePointer<CGroupedRuntime> runtime;
+        };
+
+        using TRuntimeMap = std::map<const void*, SRuntimeRecord>;
+
+        [[nodiscard]] bool                     onEventThread() const noexcept;
+        [[nodiscard]] bool                     exactCurrentRoute(const POutputBridgeObservation& current, const PResolvedTiledAtomicRoute& route) const noexcept;
+        [[nodiscard]] eGroupedStageResult      stageRecord(const POutputBridgeObservation& current, const PResolvedTiledAtomicRoute& route);
+        [[nodiscard]] bool                     applyReservationEffects(const CGroupedRuntime::SEffects& effects) noexcept;
+        [[nodiscard]] bool                     synchronizeRoute(SRuntimeRecord& record) noexcept;
+        [[nodiscard]] SGroupedQuiesceResult    quiesceAllUnguarded(eTiledQuiesceReason reason) noexcept;
+        [[nodiscard]] SGroupedRetirementResult retireUnguarded(SRuntimeRecord& record, eTiledRetirementProof proof);
+        [[nodiscard]] SRuntimeRecord*          recordFor(const POutputDefinitionIdentity& identity) noexcept;
+        [[nodiscard]] const SRuntimeRecord*    recordFor(const POutputDefinitionIdentity& identity) const noexcept;
+
+        std::thread::id                        m_eventThread;
+        CTiledFlipReservationRegistry          m_reservations;
+        TRuntimeMap                            m_runtimes;
+        bool                                   m_mutationActive = false;
+        bool                                   m_terminal       = false;
+
+        friend class ::Aquamarine::NDRM::NTiledRuntimeAuthorityTest::CFixtureAuthority;
+    };
+}
+
+#undef AQ_TILED_RUNTIME_AUTHORITY_PRIVATE
diff --git a/tests/TiledAtomic.cpp b/tests/TiledAtomic.cpp
index a44eface76581ae512decbf72251ba803b22ba97..8a5565e49e164903fc7c29da07f0d9d9817cd7b8 100644
--- a/tests/TiledAtomic.cpp
+++ b/tests/TiledAtomic.cpp
@@ -1,4 +1,5 @@
 #include "backend/drm/TiledAtomic.hpp"
+#include "backend/drm/TiledRuntimeAuthority.hpp"
 
 #include <algorithm>
 #include <cerrno>
@@ -96,10 +97,100 @@ using namespace Aquamarine::NDRM::NTiledAtomic;
 using namespace Aquamarine::NDRM::NTiledCrtcAllocator;
 using namespace Aquamarine::NDRM::NTiledIncarnations;
 using namespace Aquamarine::NDRM::NTiledOutputBridge;
+using namespace Aquamarine::NDRM::NTiledRuntimeAuthority;
 using namespace Aquamarine::NDRM::NTiledScan;
 using Hyprutils::Memory::CSharedPointer;
 using Hyprutils::Memory::makeShared;
 
+namespace Aquamarine::NDRM::NTiledRuntimeAuthorityTest {
+    class CFixtureAuthority final {
+      public:
+        static PGroupedFrameOwner owner(const PResolvedTiledAtomicRoute& route) {
+            CSharedPointer<CGroupedFrameOwner>       mutableOwner{new CGroupedFrameOwner{route, {}, {}}};
+            CSharedPointer<const CGroupedFrameOwner> retained = mutableOwner;
+            return PGroupedFrameOwner{std::move(retained)};
+        }
+
+        static bool publishIdle(CGroupedRuntimeAuthority& authority, const POutputDefinitionIdentity& identity, uint64_t firstFramebufferId, uint64_t bufferId) {
+            auto* const RECORD = authority.recordFor(identity);
+            if (!RECORD || !RECORD->runtime || !RECORD->activeRoute)
+                return false;
+
+            const auto                                 OWNER = owner(RECORD->activeRoute);
+            std::vector<CGroupedRuntime::SMemberFrame> frames;
+            frames.reserve(RECORD->activeRoute->crtcIds().size());
+            size_t index = 0;
+            for (const auto CRTC_ID : RECORD->activeRoute->crtcIds()) {
+                frames.push_back({
+                    .crtcId = CRTC_ID,
+                    .frame =
+                        {
+                            .framebufferId    = firstFramebufferId + index,
+                            .bufferId         = bufferId,
+                            .framebufferOwner = OWNER,
+                            .bufferOwner      = OWNER,
+                        },
+                });
+                ++index;
+            }
+            return RECORD->runtime->publishIdle(std::move(frames));
+        }
+
+        static bool accept(CGroupedRuntimeAuthority& authority, const POutputDefinitionIdentity& identity, uintptr_t transactionId, uint64_t bufferId, uint64_t deadlineNs) {
+            auto* const RECORD = authority.recordFor(identity);
+            if (!RECORD || !RECORD->runtime || !RECORD->activeRoute)
+                return false;
+
+            STiledFlipRoute route{
+                .transactionId = transactionId,
+                .generation    = RECORD->activeRoute->generation(),
+                .crtcIds       = {RECORD->activeRoute->crtcIds().begin(), RECORD->activeRoute->crtcIds().end()},
+            };
+            const auto OWNER = owner(RECORD->activeRoute);
+            if (RECORD->runtime->prepare(std::move(route),
+                                         {
+                                             .framebufferId    = RECORD->activeRoute->framebuffer().id,
+                                             .bufferId         = bufferId,
+                                             .framebufferOwner = OWNER,
+                                             .bufferOwner      = OWNER,
+                                         },
+                                         deadlineNs) != eTiledRuntimePrepareError::NONE)
+                return false;
+            const auto* PREPARED = RECORD->runtime->preparedRoute();
+            if (!PREPARED) {
+                static_cast<void>(RECORD->runtime->rollbackPrepared());
+                return false;
+            }
+            const auto RESERVED = authority.m_reservations.reserveAll(*PREPARED);
+            if (!RESERVED) {
+                static_cast<void>(RECORD->runtime->rollbackPrepared());
+                return false;
+            }
+            if (!RECORD->runtime->bindReservation(RESERVED.reservation)) {
+                static_cast<void>(RECORD->runtime->rollbackPrepared());
+                static_cast<void>(authority.m_reservations.rollback(RESERVED.reservation));
+                return false;
+            }
+            const auto ACCEPTED = RECORD->runtime->accept();
+            return ACCEPTED.accepted && authority.m_reservations.accept(RESERVED.reservation);
+        }
+
+        static uint64_t activeGeneration(CGroupedRuntimeAuthority& authority, const POutputDefinitionIdentity& identity) {
+            const auto* RECORD = authority.recordFor(identity);
+            return RECORD && RECORD->runtime ? RECORD->runtime->activePlan().generation : 0;
+        }
+
+        static eGroupedStageResult nestedStage(CGroupedRuntimeAuthority& authority, const POutputBridgeObservation& current, const PResolvedTiledAtomicRoute& route) {
+            authority.m_mutationActive = true;
+            const auto RESULT          = authority.stageCurrent(current, route);
+            authority.m_mutationActive = false;
+            return RESULT;
+        }
+    };
+}
+
+using Aquamarine::NDRM::NTiledRuntimeAuthorityTest::CFixtureAuthority;
+
 namespace {
     int  FAILURES = 0;
 
@@ -923,5 +1014,79 @@ int main() {
         CHECK(completedBufferWeak.expired());
     }
 
+    // The per-backend authority remains source-private and operationally inert:
+    // this fixture stages exact routes directly, without a production output,
+    // request, ioctl, or DRM event call site.
+    {
+        CGroupedRuntimeAuthority authority;
+        CHECK(authority.stageCurrent(installed, resolved.route) == eGroupedStageResult::STAGED);
+        CHECK(CFixtureAuthority::nestedStage(authority, installed, resolved.route) == eGroupedStageResult::BUSY);
+        CHECK(CFixtureAuthority::publishIdle(authority, GROUP.definitionIdentity(), 1'500, 1'100));
+        CHECK(CFixtureAuthority::accept(authority, GROUP.definitionIdentity(), 5'005, 1'101, 90'000));
+
+        CHECK(bridge.clear());
+        CHECK(!bridge.diagnosticInstalled());
+        const auto successorScan     = CScanFixtureAuthority::mint(session, {1, 2}, tiledGroup(device->deviceId()), 11);
+        const auto successorSnapshot = snapshotFor(successorScan, resources, 42);
+        const auto successorPlan     = planFor(successorSnapshot);
+        const auto successorPrepared = bridge.prepare(successorPlan);
+        CHECK(static_cast<bool>(successorPrepared));
+        CHECK(bridge.install(successorPrepared.prepared, currentFor(successorPlan)) == eInstallResult::INSTALLED);
+
+        POutputBridgeObservation successorInstalled;
+        CHECK(bridge.withCurrentOwner(currentFor(successorPlan), [&](const POutputBridgeObservation& current) { successorInstalled = current; }));
+        CHECK(successorInstalled && successorInstalled->groups().size() == 1);
+        const auto& SUCCESSOR_GROUP = successorInstalled->groups().front();
+        CHECK(sameOwner(SUCCESSOR_GROUP.definitionIdentity(), GROUP.definitionIdentity()));
+        CHECK(SUCCESSOR_GROUP.modeSet() && sameOwner(SUCCESSOR_GROUP.modeSet()->modes().front().outputMode, MODE));
+
+        const auto successorResolved = resolveCapturedTiledAtomic({
+            .generationOwner    = successorInstalled,
+            .groupDefinition    = SUCCESSOR_GROUP.scanDefinition(),
+            .definitionIdentity = SUCCESSOR_GROUP.definitionIdentity(),
+            .outputMode         = MODE,
+            .framebuffer        = resolved.route->framebuffer(),
+        });
+        CHECK(static_cast<bool>(successorResolved));
+        CHECK(authority.stageCurrent(successorInstalled, resolved.route) == eGroupedStageResult::FOREIGN_ROUTE);
+        const auto RECONCILED = authority.reconcileCurrent(successorInstalled);
+        CHECK(static_cast<bool>(RECONCILED));
+        CHECK(RECONCILED.staged == 1);
+        CHECK(RECONCILED.adopted == 0);
+        CHECK(RECONCILED.quiesced == 0);
+        CHECK(CFixtureAuthority::activeGeneration(authority, GROUP.definitionIdentity()) == resolved.route->generation());
+
+        const auto first = authority.routePageFlip(5'005, resolved.route->crtcIds().front(), 30, 200);
+        CHECK(first.claimed);
+        CHECK(first.disposition == eGroupedPageFlipDisposition::RECORDED);
+        CHECK(first.runtimeEffects.releases.empty());
+
+        auto completion = authority.routePageFlip(5'005, resolved.route->crtcIds().back(), 40, 220);
+        CHECK(completion.claimed);
+        CHECK(completion.disposition == eGroupedPageFlipDisposition::COMPLETED);
+        CHECK(completion.reservationRetired);
+        CHECK(completion.runtimeEffects.schedulerComplete);
+        CHECK(completion.runtimeEffects.present);
+        CHECK(completion.runtimeEffects.successorAdopted);
+        CHECK(completion.runtimeEffects.successorGeneration == successorResolved.route->generation());
+        CHECK(completion.runtimeEffects.releases.size() == 1);
+        CHECK(completion.runtimeEffects.releases.front().bufferId == 1'100);
+        CHECK(completion.runtimeEffects.releases.front().owner.get());
+        CHECK(sameOwner(completion.runtimeEffects.releases.front().owner.get()->route(), resolved.route));
+        CHECK(sameOwner(completion.route, resolved.route));
+        CHECK(CFixtureAuthority::activeGeneration(authority, GROUP.definitionIdentity()) == successorResolved.route->generation());
+
+        const auto stale = authority.routePageFlip(5'005, resolved.route->crtcIds().back(), 41, 221);
+        CHECK(stale.claimed);
+        CHECK(stale.disposition == eGroupedPageFlipDisposition::STALE);
+
+        completion.runtimeEffects.releases.clear();
+        const auto QUIESCED = authority.quiesceAll(eTiledQuiesceReason::BACKEND_TEARDOWN);
+        CHECK(!QUIESCED.invariantFailed);
+        CHECK(QUIESCED.quiesced == 1);
+        CHECK(authority.terminalShutdown(eTiledRegistryShutdownProof::BACKEND_NO_CALLBACKS, eTiledRetirementProof::BACKEND_TEARDOWN_NO_CALLBACKS));
+        CHECK(authority.readyForDestruction());
+    }
+
     return FAILURES == 0 ? 0 : 1;
 }
diff --git a/tests/TiledDRMIntegration.cpp b/tests/TiledDRMIntegration.cpp
index ecd0678b24c60969f0dbe9f58ee9beca17488954..84c7bef3c17e7934d9c4f9d998453979a7f90e86 100644
--- a/tests/TiledDRMIntegration.cpp
+++ b/tests/TiledDRMIntegration.cpp
@@ -417,7 +417,10 @@ int main() {
         EXPECT(!!REPLACEMENT, true);
         EXPECT(REPLACEMENT != SHADOW, true);
         EXPECT(REPLACEMENT_GROUP && REPLACEMENT_GROUP->projection() == eGroupProjection::MULTI_STREAM_ALLOCATED, true);
-        EXPECT(REPLACEMENT_GROUP && REPLACEMENT_GROUP->definitionIdentity() != DEFINITION_IDENTITY, true);
+        // Clearing current authorization must not destroy the immediately
+        // preceding semantic lineage used for exact successor reconciliation.
+        EXPECT(REPLACEMENT_GROUP && REPLACEMENT_GROUP->definitionIdentity() == DEFINITION_IDENTITY, true);
+        EXPECT(REPLACEMENT_GROUP && REPLACEMENT_GROUP->modeSet() && REPLACEMENT_GROUP->modeSet()->modes().front().outputMode == OUTPUT_MODE, true);
         EXPECT(CFixtureAuthority::withCurrent(registry, LIFETIME, SHADOW, [&](const CPlan&, const SCurrentState&) { ++callbacks; }), false);
         EXPECT(callbacks, 1U);
         auto begun = CFixtureAuthority::begin(registry, LIFETIME);