From 354f7f072eefcb6671f1d4954a528b3e5a95a500 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 14 Jul 2022 10:58:37 +0200 Subject: 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. Change-Id: Ie3a99ec4bc24901e1303631097a395fde8dbe110 Reviewed-by: Janne Koskinen Reviewed-by: Andy Nichols (cherry picked from commit 61806a058a17e35f082dfbf59719a9216b2aebf7) Reviewed-by: Qt Cherry-pick Bot --- .../eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp index 26e5cafe47..c77373660d 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp @@ -359,20 +359,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); -- cgit v1.2.3