backends/drm: remove amd cursor-only commit workaround

The workaround prevents cropping with direct scanout, and it's no longer necessary
because we force a software cursor with adaptive sync on AMD to work around a related
problem
This commit is contained in:
Xaver Hugl 2024-04-03 14:46:09 +02:00
parent 9c2035ca63
commit 4448e23363

View file

@ -279,14 +279,8 @@ DrmPipeline::Error DrmPipeline::prepareAtomicPresentation(DrmAtomicCommit *commi
return Error::None;
}
static const bool s_vrrCursorWorkaround = qEnvironmentVariableIntValue("KWIN_DRM_NO_VRR_CURSOR_WORKAROUND") == 0;
void DrmPipeline::prepareAtomicCursor(DrmAtomicCommit *commit)
{
if (s_vrrCursorWorkaround && m_pending.presentationMode != PresentationMode::VSync) {
// trigger a pageflip on the primary plane, as a workaround for https://gitlab.freedesktop.org/drm/amd/-/issues/3034
commit->addProperty(m_pending.crtc->primaryPlane()->srcX, 0);
}
auto plane = m_pending.crtc->cursorPlane();
const auto layer = cursorLayer();
plane->set(commit, QPoint(0, 0), gpu()->cursorSize(), QRect(layer->position().toPoint(), gpu()->cursorSize()));