summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/kmsconvenience
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-041-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| | * Fix typo in debug statement: QPlatformScren -> QPlatformScreenSérgio Martins2017-09-241-1/+1
| | | | | | | | | | | | | | | Change-Id: Ibf5046ff88cbad1f03966f39f62183b0bd750221 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Build fix for clang-5.0Jędrzej Nowacki2017-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | qkmsdevice.cpp:737:40: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] Change-Id: I90f0281baeb7bd8216d62515e4b087070c98c235 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Fix compilation with clang, missing errno.hDavid Faure2017-10-121-0/+2
| | | | | | | | | | | | | | | | | | | | | Similar to cfe1a295fc which was in a different file. Change-Id: I40e204f8603a2d4c10a6c737192957653f537d1a Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | kms: Discover all available planesLaszlo Agocs2017-09-192-0/+205
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-63058 Change-Id: I655384916bedbeb0da516e2eaa177d1128272d1c Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | | kms: Fix crtc allocation logicLaszlo Agocs2017-09-192-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The intention of choosing a different CRTC for each connector is fine, but the code is flawed: the bitmask thas marks used crtc must be based on the crtc index, not the id. In practice the fix makes a difference only when multiple connectors are in use and there are crtc ids above 31. Task-number: QTBUG-63058 Change-Id: I74e01add72df9c6e0b8fbddab978c102573a282c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | kms: Rename the plane index workaround vars appropriatelyLaszlo Agocs2017-09-192-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...and purge support from eglfs_kms. That path never worked, the environment variable was meant for the NVIDIA backend only. Task-number: QTBUG-63058 Change-Id: I8cf47168d5878e18eb22c839d56e2d48cbb4fdad Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs_kms: Add headless mode for DRM render nodesLaszlo Agocs2017-09-052-17/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | kms: Remove unused member variableLaszlo Agocs2017-09-052-3/+0
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-62262 Change-Id: Ia0bdac0ebca1a2e1bf2ae8e7cd4db22bf9c445de Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs_kms: Output cloning supportLaszlo Agocs2017-09-052-38/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | { "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>
* | | kms: Add support for filtering based on vrefreshLaszlo Agocs2017-09-051-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to "mode": "1280x720", one can now also specify the vrefresh value: "mode": "1280x720@50". This way if there is both a 60 and 50 Hz variant, then it is now possible to choose the 50 Hz one. Task-number: QTBUG-62262 Change-Id: I9ca21c5a513621c83f2f5348c411d8d7c5492b3d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs_kms: Add support for formats other than XRGB8888Laszlo Agocs2017-09-052-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to drmModeAddFB2 and add mappings for RGB565 and ARGB8888, and some BGR variants. The default is XRGB8888, like before. Others can be requested in the config file with "format": "rgb565" or "argb8888" etc. on a per-output basis. If the primary plane does not support the format, modesetting and flipping will fail. Task-number: QTBUG-62262 Change-Id: I8537cbeed7f046c46aa63fcea6d6946c0e0038a7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs_kms: Report the real preferred mode from QScreenLaszlo Agocs2017-09-051-6/+6
|/ / | | | | | | | | | | | | | | ...and make the struct initialization more readable while we are at it. Task-number: QTBUG-62262 Change-Id: I1af82d1b2fd5a3c94dcdb720920618d4da80c21c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | eglfs_kms: Decode EDID blobPier Luigi Fiorini2017-05-022-0/+25
| | | | | | | | | | | | | | | | | | | | Retrieve and parse EDID blob. Return screen product information from EDID. [ChangeLog][QPA][eglfs][kms] Add screen product information from EDID. Change-Id: I766999afd9298e82f6147fdeba5d14757bfb4b03 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-201-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.h src/corelib/tools/qdatetime.h src/corelib/tools/qstring.h src/corelib/tools/qversionnumber.h src/plugins/platforms/android/qandroidplatformintegration.cpp tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
| * Disable precompiled headers for small modulesThiago Macieira2017-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Creating a precompiled header exclusively for a one- or two-file module is wasteful. The time that it takes to build the precompiled source is on the same order as a regular compilation, so enabling precompiled headers for those modules just makes the build slower. Also make it possible to override the precompiled header by just setting PRECOMPILED_HEADER to empty. Change-Id: I0e1a09998253489388abfffd14b5f221288c4826 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | eglfs_kms: Mode supportPier Luigi Fiorini2017-02-242-0/+2
|/ | | | | | | | | Add support for reporting available modes. [ChangeLog][QPA][eglfs][kms] List screen modes, current and preferred mode. Change-Id: If64c1512271fadbafbb8c9fd715e64663d598599 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* DRM/KMS config: add support for specifying the primary screenLaszlo Agocs2017-01-182-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not having a way to say that a given output should be registered as the primary screen (meaning it comes first in the QGuiApplication::screens() list, emits primaryScreenChanged() signal etc.) can be a problem for some systems. The order of the outputs array in the JSON configuration file is not relevant in this respect since screens are registered either in the original DRM connector order, or, when the virtual desktop layout is specified via virtualIndex, in the order specified by virtualIndex. The primary screen status is independent from this. Therefore, add a new, optional boolean property: primary. For example, the following forces the QScreen corresponding to the VGA output to be the primary screen on the Renesas R-Car H2 board, even though by default it is the HDMI one that happens to be reported first by the system. { "device": "/dev/dri/card0", "outputs": [ { "name": "HDMI1", "mode": "1280x720" }, { "name": "VGA1", "mode": "1280x720", "primary": true }, { "name": "LVDS1", "mode": "off" } ] } In addition, improve the quality of the logging output. [ChangeLog][Platform Specific Changes] Added support for specifying the primary screen in the JSON config file in QT_QPA_EGLFS_KMS_CONFIG when running on DRM/KMS with eglfs. Task-number: QTBUG-57980 Change-Id: Iba490800dee3b7162c68c4d40b0822f3f6d81b69 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-132-1/+40
| | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
* Add aliases for env vars common to eglfs and linuxfbLaszlo Agocs2016-11-241-6/+13
| | | | | | | | | | Now that the generic DRM code is shared between multiple platform plugins, the QT_QPA_EGLFS prefix is not that ideal anymore. Introduce aliases without EGLFS. Task-number: QTBUG-56306 Change-Id: I0cf374f8c8d12aa0eab2f026ffa9201b3af35ce2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Move DRM/KMS code from eglfs into kmsconvenienceLaszlo Agocs2016-11-163-0/+793
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>