diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-07-14 10:58:37 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2022-08-01 12:40:45 +0200 |
commit | 61806a058a17e35f082dfbf59719a9216b2aebf7 (patch) | |
tree | f82f485008281cc4d0ef90e08895cfc59e01e692 /src/plugins/platforms/eglfs | |
parent | 5b334729d30d89ad7433f7051d94acb21a1938fb (diff) |
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 <janne.p.koskinen@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs')
-rw-r--r-- | src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp | 11 |
1 files 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); |