[platforms/drm] introduce env var to select GPU
Summary: In some environemnts it is possible that udev detection of primary GPU fails and it picks the first available card (normally card0). But it is not desired, and it would be required to use different card (card1). Introduce environment variable, which when used, will make it possible to use different card node then one selected by udev. You can use it like KWIN_DRM_DEVICE_NODE=/dev/dri/card1 kwin_wayland Test Plan: Tested on the device where card0 was not usable for kms, but card1 Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D24051
This commit is contained in:
parent
48691c406e
commit
6b610927f4
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ void DrmBackend::openDrm()
|
|||
qCWarning(KWIN_DRM) << "Did not find a GPU";
|
||||
return;
|
||||
}
|
||||
m_devNode = device->devNode();
|
||||
m_devNode = qEnvironmentVariableIsSet("KWIN_DRM_DEVICE_NODE") ? qgetenv("KWIN_DRM_DEVICE_NODE") : QByteArray(device->devNode());
|
||||
int fd = LogindIntegration::self()->takeDevice(m_devNode.constData());
|
||||
if (fd < 0) {
|
||||
qCWarning(KWIN_DRM) << "failed to open drm device at" << m_devNode;
|
||||
|
|
Loading…
Reference in a new issue