backends/drm: work around atomic commits failing with NVidia
For some reason, when IN_FENCE_FD is set, the NVidia driver rejects the commit. Until that's fixed in the driver, don't set the property BUG: 478246
This commit is contained in:
parent
eb13085de2
commit
50899f3f34
3 changed files with 9 additions and 1 deletions
|
@ -57,7 +57,8 @@ void DrmAtomicCommit::addBuffer(DrmPlane *plane, const std::shared_ptr<DrmFrameb
|
||||||
{
|
{
|
||||||
addProperty(plane->fbId, buffer ? buffer->framebufferId() : 0);
|
addProperty(plane->fbId, buffer ? buffer->framebufferId() : 0);
|
||||||
m_buffers[plane] = buffer;
|
m_buffers[plane] = buffer;
|
||||||
if (plane->inFenceFd.isValid()) {
|
// atomic commits with IN_FENCE_FD fail with NVidia
|
||||||
|
if (plane->inFenceFd.isValid() && !plane->gpu()->isNVidia()) {
|
||||||
addProperty(plane->inFenceFd, buffer ? buffer->syncFd().get() : -1);
|
addProperty(plane->inFenceFd, buffer ? buffer->syncFd().get() : -1);
|
||||||
}
|
}
|
||||||
m_planes.emplace(plane);
|
m_planes.emplace(plane);
|
||||||
|
|
|
@ -79,6 +79,7 @@ DrmGpu::DrmGpu(DrmBackend *backend, const QString &devNode, int fd, dev_t device
|
||||||
// find out what driver this kms device is using
|
// find out what driver this kms device is using
|
||||||
DrmUniquePtr<drmVersion> version(drmGetVersion(fd));
|
DrmUniquePtr<drmVersion> version(drmGetVersion(fd));
|
||||||
m_isI915 = strstr(version->name, "i915");
|
m_isI915 = strstr(version->name, "i915");
|
||||||
|
m_isNVidia = strstr(version->name, "nvidia-drm");
|
||||||
m_isVirtualMachine = strstr(version->name, "virtio") || strstr(version->name, "qxl")
|
m_isVirtualMachine = strstr(version->name, "virtio") || strstr(version->name, "qxl")
|
||||||
|| strstr(version->name, "vmwgfx") || strstr(version->name, "vboxvideo");
|
|| strstr(version->name, "vmwgfx") || strstr(version->name, "vboxvideo");
|
||||||
|
|
||||||
|
@ -695,6 +696,11 @@ bool DrmGpu::isI915() const
|
||||||
return m_isI915;
|
return m_isI915;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DrmGpu::isNVidia() const
|
||||||
|
{
|
||||||
|
return m_isNVidia;
|
||||||
|
}
|
||||||
|
|
||||||
bool DrmGpu::isRemoved() const
|
bool DrmGpu::isRemoved() const
|
||||||
{
|
{
|
||||||
return m_isRemoved;
|
return m_isRemoved;
|
||||||
|
|
|
@ -78,6 +78,7 @@ public:
|
||||||
bool addFB2ModifiersSupported() const;
|
bool addFB2ModifiersSupported() const;
|
||||||
bool asyncPageflipSupported() const;
|
bool asyncPageflipSupported() const;
|
||||||
bool isI915() const;
|
bool isI915() const;
|
||||||
|
bool isNVidia() const;
|
||||||
gbm_device *gbmDevice() const;
|
gbm_device *gbmDevice() const;
|
||||||
EglDisplay *eglDisplay() const;
|
EglDisplay *eglDisplay() const;
|
||||||
DrmBackend *platform() const;
|
DrmBackend *platform() const;
|
||||||
|
|
Loading…
Reference in a new issue