backends/drm: fix legacy modesets

There's no pending frame on modesets with legacy, so calling pageFlipped crashes KWin

BUG: 473664
This commit is contained in:
Xaver Hugl 2023-08-23 13:28:58 +02:00
parent 2814030fef
commit a800b54a13

View file

@ -126,7 +126,7 @@ bool DrmLegacyCommit::doModeset(DrmConnector *connector, DrmConnectorMode *mode)
{
uint32_t connectorId = connector->id();
if (drmModeSetCrtc(gpu()->fd(), m_pipeline->crtc()->id(), m_buffer->framebufferId(), 0, 0, &connectorId, 1, mode->nativeMode()) == 0) {
pageFlipped(std::chrono::steady_clock::now().time_since_epoch());
m_pipeline->crtc()->setCurrent(m_buffer);
return true;
} else {
return false;