From 61806a058a17e35f082dfbf59719a9216b2aebf7 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 14 Jul 2022 10:58:37 +0200 Subject: [PATCH] eglfs: Fix screen cloning when atomic is enabled The problem was introduced in the atomic code path only, the legacy one has always specified the correct crtc id. Amends 56149c0fbb19946050a3249acef4e86e511d3cd4. Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Ie3a99ec4bc24901e1303631097a395fde8dbe110 Reviewed-by: Janne Koskinen Reviewed-by: Andy Nichols --- .../eglfs_kms/qeglfskmsgbmscreen.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp index 9aa815ba90..c7b0208188 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp @@ -324,20 +324,21 @@ void QEglFSKmsGbmScreen::flip() if (d.screen != this) { d.screen->ensureModeSet(fb->fb); d.cloneFlipPending = true; + QKmsOutput &destOutput(d.screen->output()); if (device()->hasAtomicSupport()) { #if QT_CONFIG(drm_atomic) drmModeAtomicReq *request = device()->threadLocalAtomicRequest(); if (request) { - drmModeAtomicAddProperty(request, d.screen->output().eglfs_plane->id, - d.screen->output().eglfs_plane->framebufferPropertyId, fb->fb); - drmModeAtomicAddProperty(request, d.screen->output().eglfs_plane->id, - d.screen->output().eglfs_plane->crtcPropertyId, op.crtc_id); + drmModeAtomicAddProperty(request, destOutput.eglfs_plane->id, + destOutput.eglfs_plane->framebufferPropertyId, fb->fb); + drmModeAtomicAddProperty(request, destOutput.eglfs_plane->id, + destOutput.eglfs_plane->crtcPropertyId, destOutput.crtc_id); } #endif } else { int ret = drmModePageFlip(fd, - d.screen->output().crtc_id, + destOutput.crtc_id, fb->fb, DRM_MODE_PAGE_FLIP_EVENT, d.screen);