drmdumb: reopen displaynode (#203)

if the backends now gets a rendernode it wont call the authmagic on the
displaynode making dumb buffer creation failing on certain drivers. so
reopen it again in the creation of the CDRMDumbAllocator.
This commit is contained in:
Tom Englund 2025-08-17 21:16:10 +02:00 committed by GitHub
parent 98968ac769
commit 84d53cadf8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -249,7 +249,7 @@ SP<CDRMBackend> Aquamarine::CDRMBackend::fromGpu(std::string path, SP<CBackend>
drmBackend->grabFormats();
drmBackend->dumbAllocator = CDRMDumbAllocator::create(gpu->fd, backend);
drmBackend->dumbAllocator = CDRMDumbAllocator::create(drmBackend->backend->reopenDRMNode(gpu->fd), backend);
// so that session can handle udev change/remove events for this gpu
backend->session->sessionDevices.push_back(gpu);
@ -333,7 +333,7 @@ std::vector<SP<CDRMBackend>> Aquamarine::CDRMBackend::attempt(SP<CBackend> backe
newPrimary = drmBackend;
}
drmBackend->dumbAllocator = CDRMDumbAllocator::create(gpu->fd, backend);
drmBackend->dumbAllocator = CDRMDumbAllocator::create(drmBackend->backend->reopenDRMNode(gpu->fd), backend);
backends.emplace_back(drmBackend);