summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.h
Commit message (Collapse)AuthorAgeFilesLines
* Export gbm device integration to build it outsideElvis Lee2020-10-231-88/+0
| | | | | | | | | | | Support external build for device integration which uses kms and gbm. QKmsScreenConfig supports inheritance to consider platform specific screen configuration. Task-number: QTBUG-85268 Change-Id: Iac58898a9cf0bb1d53237a719667a6ebd53d88b9 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Use QList instead of QVector in pluginsJarek Kobus2020-07-061-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic86f4a3000592a1c9ae62e4a83f4fe39832a6b24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* eglfs: kms: Fix hw cursor with multiple screensLaszlo Agocs2019-11-141-0/+4
| | | | | | | | | | | | | | | | We used to have the assumption that moving the cursor to an out of range position is valid and will result in a hidden cursor. This is apparently not the case. For example, on an RPi4 with Mesa V3D we get lots of funny artifacts after doing drmModeMoveCursor() to invalid positions. To remedy this, start hiding the cursor correctly when the position is clearly out of the screen's bounds. Task-number: QTBUG-79924 Change-Id: I3ef7ad0ce928546399443f21452f0b6deadf8036 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Remove unused virtuals and move flip callbackLaszlo Agocs2017-09-191-8/+0
| | | | | | | | ...to the screen, where it belongs. Task-number: QTBUG-63088 Change-Id: I4bfc4c259f91431d12851f888a7d044e43856d63 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Add headless mode for DRM render nodesLaszlo Agocs2017-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to switch /dev/dri/cardX to /dev/dri/renderDY is futile on its own now since many output-related drm operations fail and we eventually crash. Add a new headless mode that skips the real screen stuff and registers a fairly dummy, headless screen, does not bother with the mouse cursor, and disallows rendering to the screen via a QWindow (while keeping the actual rendering still fully functional). Such applications will not need any special privileges and will run even if there is a DRM master (X11, Wayland compositor) active. For example the configuration can look like this: { "device": "/dev/dri/renderD128", "headless": "1024x768" } After this applications have two choices to perform offscreen rendering: 1. Use an ordinary window (and its default framebuffer, meaning the gbm_surface), e.g. a QOpenGLWindow subclass MyOpenGLWindow w; w.show(); // will not actually show on screen w.grabFramebuffer().save("output.png"); Note that there is no vsync-based throttling. Also note that windows are still sized to match the screen size, hence the need for specifying a size in the headless property. 2. Or the typical offscreen approach with an extra FBO QOffscreenSurface s; s.setFormat(ctx.format()); s.create(); ctx.makeCurrent(&s0; QOpenGLFramebufferObject fbo(1024, 768); fbo.bind(); ctx.functions()->glClearColor(1, 0, 0, 1); ctx.functions()->glClear(GL_COLOR_BUFFER_BIT); fbo.toImage().save("output.png"); ctx.doneCurrent(); Task-number: QTBUG-62262 Change-Id: Ic1dbfa2b27b223bd5ef8ba36b665f0f61abf4f06 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs_kms: Output cloning supportLaszlo Agocs2017-09-051-0/+3
| | | | | | | | | | | | | | | | | | | | | { "device": "/dev/dri/card0", "outputs": [ { "name": "HDMI1", "mode": "1920x1080" }, { "name": "DP1", "mode": "1920x1080", "clones": "HDMI1" } ] } Here, assuming the QScreen for DP1 is unused and the resolution is the same, DP1 will simply mirror whatever is on HDMI1. The plane-based mouse cursor is not currently supported. Same goes for any form of scaling since this simply scans out the same framebuffer on all target CRTCs. Task-number: QTBUG-62262 Change-Id: I391be204264284a1bff752ebc2a1dbe5c8592013 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: Replace Q_DECL_OVERRIDE by overrideAlexander Volkov2016-12-071-4/+4
| | | | | | | | We can use 'override' directly since Qt 5.7. Also remove redundant 'virtual'. Change-Id: I4c1d5d8a69bf51a7f31077f7cdc74ba06da0bc11 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move DRM/KMS code from eglfs into kmsconvenienceLaszlo Agocs2016-11-161-6/+5
| | | | | | | | | | | The generic DRM code, not involving any GBM or EGLDevice stuff, can now be reused in components outside eglfs, for example linuxfb in order to get support for DRM dumb buffers. Task-number: QTBUG-56306 Change-Id: If7dffdb2415489dbc6470782fa76efcaeccf01c7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: Configurable screen order in the virtual desktopLaszlo Agocs2016-08-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Say one wants a virtual desktop with the display on HDMI above the display on DisplayPort: { "device": "drm-nvdc", "virtualDesktopOrientation": "vertical", "outputs": [ { "name": "HDMI1", "virtualIndex": 0 }, { "name": "DP1" } ] } Undefined virtualIndex values map to INT_MAX and will go after the explicitly specified ones. However, the sorting is stable so the original order from the DRM connector list is preserved between such outputs. Task-number: QTBUG-55188 Change-Id: I204fb08205ea7dbfbcdefd1d22ed22f5387f3e8c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: Fix DRM+KMS backendsLaszlo Agocs2016-05-101-1/+1
| | | | | | | | The native display was simply invalid. Task-number: QTBUG-53225 Change-Id: I682fb1d91dbea3dab971a079060d181fc313da46 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
* Multi-screen handling for the eglfs_kms_egldevice backendDominik Holland2016-04-151-0/+90
Separates the generic kms classes into a own kms static lib called QtEglFsKmsSupport. The eglfs_kms plugin was changed to use these base classes and got renamed accordingly to QEglFSKmsGbm*. The eglfs_kms_egldevice plugin got extended to also derive from the kms base classed and by this provides multi-screen support Change-Id: I6de6a754e94cb8d52cf8e658b03c6bd6637674a1 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>