backends/drm: use dumb buffers for the cursor on virtual machines

Apparently not all VM drivers handle dmabufs on the cursor plane correctly

BUG: 485827
This commit is contained in:
Xaver Hugl 2024-04-22 13:20:09 +02:00
parent 1f32171ac9
commit c14c61f745
3 changed files with 7 additions and 1 deletions

View file

@ -21,7 +21,7 @@ namespace KWin
EglGbmCursorLayer::EglGbmCursorLayer(EglGbmBackend *eglBackend, DrmPipeline *pipeline)
: DrmPipelineLayer(pipeline)
, m_surface(pipeline->gpu(), eglBackend, pipeline->gpu()->atomicModeSetting() ? EglGbmLayerSurface::BufferTarget::Linear : EglGbmLayerSurface::BufferTarget::Dumb, EglGbmLayerSurface::FormatOption::RequireAlpha)
, m_surface(pipeline->gpu(), eglBackend, pipeline->gpu()->atomicModeSetting() && !pipeline->gpu()->isVirtualMachine() ? EglGbmLayerSurface::BufferTarget::Linear : EglGbmLayerSurface::BufferTarget::Dumb, EglGbmLayerSurface::FormatOption::RequireAlpha)
{
}

View file

@ -692,6 +692,11 @@ bool DrmGpu::isVmwgfx() const
return m_isVmwgfx;
}
bool DrmGpu::isVirtualMachine() const
{
return m_isVirtualMachine;
}
bool DrmGpu::isRemoved() const
{
return m_isRemoved;

View file

@ -80,6 +80,7 @@ public:
bool isNVidia() const;
bool isAmdgpu() const;
bool isVmwgfx() const;
bool isVirtualMachine() const;
EglDisplay *eglDisplay() const;
DrmBackend *platform() const;
/**