Drop DRM master after opening card node so the composer can master it

Change-Id: I6e40ed8fbfec788bc8f5382338d573057f230f79
This commit is contained in:
Brendan Szymanski 2026-07-12 14:31:15 -04:00
parent b7c93249f6
commit 710cfdaae9

View file

@ -144,8 +144,19 @@ static struct driver *init_try_nodes()
// Try card nodes... for vkms mostly.
for (uint32_t i = min_card_node; i < max_card_node; i++) {
drv = init_try_node(i, card_nodes_fmt);
if (drv)
if (drv) {
/*
* Opening a primary (card) node makes this process the DRM
* master as the first opener. minigbm only performs dumb-buffer
* allocation here, which does not require master, so drop it so
* the KMS composer (drm_hwcomposer) can acquire master and drive
* the display. Without this, whichever of the gralloc allocator
* and the composer opens the card node first wins master and the
* loser falls back to a headless null-display (black screen).
*/
drmDropMaster(drv_get_fd(drv));
return drv;
}
}
return nullptr;