diff --git a/src/backend/drm/DRM.cpp b/src/backend/drm/DRM.cpp index f69a444..f0f37af 100644 --- a/src/backend/drm/DRM.cpp +++ b/src/backend/drm/DRM.cpp @@ -50,7 +50,7 @@ static udev_enumerate* enumDRMCards(udev* udev) { return nullptr; udev_enumerate_add_match_subsystem(enumerate, "drm"); - udev_enumerate_add_match_sysname(enumerate, DRM_PRIMARY_MINOR_NAME "[0-9]*"); + udev_enumerate_add_match_sysname(enumerate, DRM_PRIMARY_MINOR_NAME "[0-9]"); if (udev_enumerate_scan_devices(enumerate)) { udev_enumerate_unref(enumerate); @@ -75,8 +75,6 @@ static std::vector> scanGPUs(SP backend) { } udev_list_entry* entry = nullptr; - size_t i = 0; - std::deque> devices; udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(enumerate)) { @@ -125,8 +123,6 @@ static std::vector> scanGPUs(SP backend) { devices.push_front(sessionDevice); else devices.push_back(sessionDevice); - - ++i; } udev_enumerate_unref(enumerate); @@ -1404,6 +1400,11 @@ bool Aquamarine::CDRMOutput::commitState(bool onlyTest) { return false; } + if (!backend->rendererState.renderer) { + backend->backend->log(AQ_LOG_ERROR, "drm: No renderer attached to backend"); + return false; + } + const auto& STATE = state->state(); const uint32_t COMMITTED = STATE.committed;