platforms/drm: Fix explicitGpus check

The check for explicitGpus in udev event handler was limited to new
GPUs, and didn't consider changes to the GPU driver, eg. from vfio-pci
to amdgpu
This commit is contained in:
Amir Maimon 2021-09-22 15:07:08 +03:00 committed by Vlad Zahorodnii
parent 21a17c87db
commit 51925567f6

View file

@ -234,11 +234,11 @@ void DrmBackend::handleUdevEvent()
if (!session()->isActive()) {
continue;
}
if (!m_explicitGpus.isEmpty() && !m_explicitGpus.contains(device->devNode())) {
continue;
}
if (device->action() == QStringLiteral("add")) {
if (!m_explicitGpus.isEmpty() && !m_explicitGpus.contains(device->devNode())) {
continue;
}
qCDebug(KWIN_DRM) << "New gpu found:" << device->devNode();
if (addGpu(device->devNode())) {
updateOutputs();