backends/drm: Fix redraw issues on vmwgfx

Disable the readability checks when running on vmwgfx. The DMABuf syncs
seem broken on vmwgfx and until they're fixed disable the readablity
checks to actually let KDE propertly redraw when running on vmwgfx.
This commit is contained in:
Zack Rusin 2024-04-01 15:02:43 -04:00 committed by Xaver Hugl
parent d20d84cfa3
commit 17029cd54f
3 changed files with 10 additions and 1 deletions

View file

@ -39,8 +39,9 @@ DrmFramebuffer::DrmFramebuffer(DrmGpu *gpu, uint32_t fbId, GraphicsBuffer *buffe
, m_gpu(gpu)
, m_bufferRef(buffer)
{
if (s_disableBufferWait || (m_gpu->isI915() && !s_envIsSet)) {
if (s_disableBufferWait || ((m_gpu->isI915() || m_gpu->isVmwgfx()) && !s_envIsSet)) {
// buffer readability checks cause frames to be wrongly delayed on some Intel laptops
// and on Virtual Machines running vmwgfx
// See https://gitlab.freedesktop.org/drm/intel/-/issues/9415
m_readable = true;
}

View file

@ -80,6 +80,7 @@ DrmGpu::DrmGpu(DrmBackend *backend, int fd, std::unique_ptr<DrmDevice> &&device)
m_isI915 = strstr(version->name, "i915");
m_isNVidia = strstr(version->name, "nvidia-drm");
m_isAmdgpu = strstr(version->name, "amdgpu");
m_isVmwgfx = strstr(version->name, "vmwgfx");
m_isVirtualMachine = strstr(version->name, "virtio") || strstr(version->name, "qxl")
|| strstr(version->name, "vmwgfx") || strstr(version->name, "vboxvideo");
@ -678,6 +679,11 @@ bool DrmGpu::isAmdgpu() const
return m_isAmdgpu;
}
bool DrmGpu::isVmwgfx() const
{
return m_isVmwgfx;
}
bool DrmGpu::isRemoved() const
{
return m_isRemoved;

View file

@ -80,6 +80,7 @@ public:
bool isI915() const;
bool isNVidia() const;
bool isAmdgpu() const;
bool isVmwgfx() const;
EglDisplay *eglDisplay() const;
DrmBackend *platform() const;
/**
@ -137,6 +138,7 @@ private:
bool m_isNVidia;
bool m_isI915;
bool m_isAmdgpu;
bool m_isVmwgfx;
bool m_isVirtualMachine;
bool m_supportsCursorPlaneHotspot = false;
bool m_asyncPageflipSupported = false;