summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge remote-tracking branch 'origin/5.11' into 5.12.0Liang Qi2018-11-051-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoaglcontext.mm src/plugins/platforms/xcb/qxcbscreen.h Change-Id: If9b4c67288396ff7346088ce591c7a3588b51979
| * eglfs_kms: initialize m_deviceListenerSamuli Piippo2018-10-311-0/+1
| | | | | | | | | | | | | | | | | | If QT_QPA_EGLFS_HIDECURSOR was enabled, m_deviceListener was never initialized, which caused segfault in the destructor. Task-number: QTBUG-71507 Change-Id: Id8b17f5312073249cd12995317213fd746753521 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-173-6/+22
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| * Use native visual ID when creating GBM surfaces for KMSPaul Olav Tvete2018-10-123-6/+22
| | | | | | | | | | | | | | | | | | | | According to the Khronos documentation, gbm_surface_create() will give a BAD_MATCH error if the format does not match the EGL_NATIVE_VISUAL_ID. Newer drivers have started to enforce this. Change-Id: I61360b0f52965ad8057e7de8f824ffca64fea904 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
* | Cleanup in eglfs device integration .pro filesSimon Hausmann2018-10-0511-12/+0
| | | | | | | | | | | | | | | | | | There is no need to apply QMAKE_LFLAGS_NOUNDEF in a .pro file that loads qt_module.prf or qt_plugin.prf, both of which do the same. Change-Id: I1ec86cddb4d0991becc136f8bd50d6652c885a6b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Make local symbols of some leaked namesThiago Macieira2018-08-031-0/+2
| | | | | | | | | | | | | | | | | | Unnamed namespaces and static are great tools. Use them. Change-Id: Ie01831ddac5446fdbdeefffd15468b3acb3ced79 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QByteArray: add compare() with case sensitivity optionsThiago Macieira2018-06-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Need to do the same for startsWith() and endsWith(). indexOf() is a lot harder. [ChangeLog][QtCore][QByteArray] Added compare(), which takes Qt::CaseSensitivity as one of the parameters. This function is more efficient than using toLower() or toUpper() and then comparing. Change-Id: Ib48364abee9f464c96c6fffd152e69bde4194df7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | eglfs/kms: Add drm atomic zpos property handlingLionel CHAZALLON2018-05-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to specify a ZPOS property for the eglfs plane ZPOS will allow to control the relative position between eglfs layer and the other layers. It is bound to using QT_QPA_EGLFS_KMS_ZPOS environment variable to determine its value. Change-Id: I51986ccb22a9dbaeef20165ac5feb7dbe8047373 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-031-9/+17
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| * Configure window manager to support RCar D3Timo Aarnipuro2018-05-031-9/+17
| | | | | | | | | | | | | | | | | | Initialize the device earlier and enable the screen as well. These changes are also compatible with the RCar H3. Change-Id: I4a83dedc0eed9df181c32e60ebf3666824d2a6c6 Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs/kms: also set windowing properties on planesLionel CHAZALLON2018-04-091-0/+4
| | | | | | | | | | | | | | | | | | The 0 values should be default for X,Y both on plane and crtc. But atomic implementation can have flaws on some devices so we don't assume they are defaulted right and set them to 0. Change-Id: I2f7dc98fdba523eb46eb86b97568d18b6cfd1277 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs/kms: Add framebuffer scaling ability with KMS atomicLionel CHAZALLON2018-04-043-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit will add the possibility to have a different sizes between framebuffer and videomode using DRM atomic, which is not possible with DRM legacy. The main goal of this change is to allow to get decent performance on embedded devices which can support high resolution display (ie UHD), and which don't have a GPU able to achieve decent framerate in such resolutions. This patch adds a "size" member to the output configuration in KMS configuration file. The GBM framebuffer will be created with that size and the GBM screen will report that size so that EGLFS can do everything normally. Scaling planes with different size than the video mode size is not something supported consistently with DRM legacy, so that feature will be only available when using the DRM atomic API. This was tested on Rock64 device, both with drm legacy and atomic. Change-Id: I8ba5bae35e61fcb7d9fc58234504bdfd647b43f6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Lionel CHAZALLON <longchair@hotmail.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-211-1/+1
|\| | | | | | | Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
| * Modernize the "regularexpression" featureUlf Hermann2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED, switch it off in the bootstrap build, remove the #ifdefs from qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression) to the header. qregularexpression.{h|cpp} are already correctly excluded in tools.pri if !qtConfig(regularexpression). Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | eglfs/kms: Share drm connector id with nativeRes.ForScreenLionel CHAZALLON2018-03-181-0/+2
| | | | | | | | | | | | | | | | This allows to share the connector id for external applications and drm layers embedding. Change-Id: I87d4c257c8d8600665eb2328f8b44df3f1ac3c0a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs/kms: Add DRM atomic ModeSettingLionel CHAZALLON2018-03-171-11/+23
| | | | | | | | | | | | | | | | | | | | | | This patch will allow to set the video mode with DRM atomic API when available. Using Atomic ModeSetting will allow further to enable framebuffer upscaling which is something not possible with DRM legacy API or at least not supported on all devices in a reliable way. Change-Id: Ie340585cf4cbf5d65555c9a7c547dcbadb327fc0 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs/kms: Share atomic request with nativeRes.ForIntegrationLionel CHAZALLON2018-03-071-0/+4
| | | | | | | | | | | | | | | | | | | | This allows to share the atomic request so that applications can blend content into overlays within the same renderloop. atomic request will allow several planes update in the same commit. Change-Id: I762ea96499765ced573e287dbd52d53c64ec7c74 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-071-5/+19
|\| | | | | | | Change-Id: I110feec4750bd304975bab4f3f33d3a61a4e08bd
| * Add WFD_DEVICE_CLIENT_TYPE attribute for INTEGRITY S820Am ADPKimmo Ollila2018-03-051-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to be compatible with latest Qualcomm BSP releases. This patch also makes it possible to select HW layer via QT_OPENWFD_CLIENT_ID and QT_OPENWFD_PIPELINE_ID environment variables. Change-Id: Ie795b21afc61a1de7c1d0b52cdb30a754e3f8266 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 00f693d3e5046999270c92731e34a3e7fcd01c6b) Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | eglfs/kms: Add DRM/KMS atomic supportLionel CHAZALLON2018-03-051-15/+50
|/ | | | | | | | | | | | | | | | | | | | | This commit adds support for DRM atomic to qtbase eglfs/KMS QPA when libdrm and device supports it. Compared To legacy DRM API, atomic API allows to update multiple planes in one vsync. This is the first part of some work that should follow and allow: - DRM framebuffer upscaling for embedded devices that have weaker GPUs - Sharing the drm atomic request if the KMSDevice so that applications in userland can blend content on overlay in the same vsync loop. One of the application for DRM atomic and Qt is typically videoplayer integration at high resolutions (UHD) on embedded devices which cannot use their GPU to render such videos, but are able to render it to a drm overlay. Change-Id: I047adf3e3d07a53440d52c2a7073c9ed054adf34 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* eglfs_kms_vsp2: Recover if queuing input buffers failsJohan Klokkhammer Helsing2018-02-154-8/+42
| | | | | | | | Clear all queued buffers, and reinitialize the Qt layer so we can try again next time. Change-Id: I921f6f457666206be92aadf2fe40b855e6ebff62 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | eglfs_kms_vsp2: Try to recover when failing in the middle of a blendJohan Klokkhammer Helsing2018-02-071-11/+6
| | | | | | | | | | | | | | | | | | Blending can fail if one of the input buffers is destroyed in the middle of the streaming operation. In that case, turn streaming off so blending can be attempted again after disabling the input. Change-Id: Id5c82b22a2ed0858ab20902395830efa0e64177d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs_kms_vsp2: Add support for setting layer alphaJohan Klokkhammer Helsing2018-02-058-0/+54
| | | | | | | | | | | | | | Exposed through QEglFSFunctions::vsp2SetLayerAlpha. Change-Id: I2a600971d5a2aa56d4bf7cde03df3323f17249cd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs/kms : implement nativeResourceForScreenLionel CHAZALLON2018-01-202-0/+11
| | | | | | | | | | | | | | This will return the crtc_id for the given screen. Change-Id: Ia4510a730e2d98c705f382644e2ab5a432612c02 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs: Forward nativeRes.ForScreen.() to backendsLionel CHAZALLON2018-01-203-2/+10
| | | | | | | | | | Change-Id: I928f97483806ee74ca844941eed455ff4f9d9508 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Add a tech preview eglfs device integration for VSP2 compositionJohan Klokkhammer Helsing2018-01-0816-1/+2301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This creates a new device integration for eglfs, eglfs_kms_vsp2, that's very similar to eglfs_kms_gbm, but includes an extra step for doing VSP2 hardware compositing. The main Qt content is drawn to double buffered off-screen GBM buffers which are converted using drmPrimeHandleToFD so we get DMA buffer file descriptors that can be used by the VSP2 blending hardware. The blending hardware writes to double buffered DRM dumb buffers, which are flipped with drmModePageFlip. Communicating with the VSP2 is done using the Video4Linux2 (V4L2) streaming API. There are two steps in creating abstractions for this. First, there is the QLinuxMedia class that consists of a Qt style wrapper for V4L2 without anything VSP2 specific. Second, there is QVsp2BlendingDevice which hides some of the streaming details of the VSP2 and has some level of error recovery. Both classes include a fair bit of logging and error reporting. The patch is written with Wayland compositors in mind, but should work for other use cases as well. This is just the basic support to make compositing work, additional features may be added in subsequent patches, i.e: - Auto-detect VSP2 (-feature-vsp2 currently needs to be explicitly enabled). - Support for setting the alpha value of a layer. - Support clipping layers. - Support for scaling layers. - Support for other output formats than RGBA32. - Hardware cursor support. - Support foreign layers below the main Qt layer. - Support for memory mapped and user pointer buffer types (currently only DMA buffers are supported). Change-Id: I1917d2dbdbaeded0d9c021baaa799d56afe1a9bd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-0214-24/+693
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-3014-24/+693
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * Add EGLFS integration plugin for Salvator-X on INTEGRITY MultivisorTimo Aarnipuro2017-12-156-0/+305
| | | | | | | | | | | | | | | | | | | | | This plugin uses the Renesas RISP Window Manager. Change-Id: If813c46ab8d39e966c0a969610841867885dd473 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * [ChangeLog][QPA][eglfs] Fix crash when using cursors and multiple GL contextsSimon Hausmann2017-12-123-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hash from QOpenGLContext* to cursor texture/shader data can accumulate dangling pointers if the program uses multiple contexts on the same screen. This is fixed by moving the cursor data into the platform context. The code for deleting the texture and shader program is omitted as it is tied to the life time of the context and the GL context deletes its resources automatically upon destruction. Task-number: QTBUG-65119 Change-Id: Ic3b8e5669d14949af811bdf047e7d47000216180 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Add EGLFS integration plugin for Qualcomm msm8996au boardKimmo Ollila2017-12-015-0/+370
| | | | | | | | | | | | | | | | | | Change-Id: I5bed1fd690daa72492e7ec5f24e80198a2592986 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Add configure test for INTEGRITY EGLFS openWFD integration pluginKimmo Ollila2017-12-011-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I846f9e555df4f64097b5634707515d45c13a521c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-71/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | eglfs_x11: remove unused event handlersGatis Paeglis2017-09-041-71/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logic that utilizes these event handlers was added by f610814b058b4639ef0d4d2592a8bcc3f81c974d and few months later broken by 2b20ed5af4d10533a14477750c7572ef09e60005. The original code used an event mask to select press/release/ motion events when creating window with XCreateWindow. The XCB replacement (xcb_create_window) changed event mask to 0, which means that these event handlers have been unused for about ~4 years and can be safely removed. The eglfs_x11 integration receives mouse input directly from libinput/evedev. Change-Id: Iac1521365445b8423898a16c3e609deb0806ce5e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-197-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | eglfs_kms: Remove unused virtuals and move flip callbackLaszlo Agocs2017-09-197-46/+29
| | | | | | | | | | | | | | | | | | | | | | | | ...to the screen, where it belongs. Task-number: QTBUG-63088 Change-Id: I4bfc4c259f91431d12851f888a7d044e43856d63 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs: Forward nativeRes.ForInteg.() to backendsLaszlo Agocs2017-09-195-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose the fd from eglfs_kms. More exposed bits will follow later on. [ChangeLog][Platform Specific Changes][eglfs] The DRM+GBM backend now exposes the DRM/GBM device handle under the key "dri_fd", queriable via nativeResourceForIntegration(). Task-number: QTBUG-63088 Change-Id: Iac95393c115bb83d1f65cb4a7acc0ea3e7d3e68f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs: Allow forwarding platformFunction() to backendsLaszlo Agocs2017-09-193-3/+8
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63088 Change-Id: I52cc56324c755cc4f7c9388470bfd27793b4abeb Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs_kms: Move out window subclass from integrationLaszlo Agocs2017-09-194-56/+153
| | | | | | | | | | | | | | | | | | | | | | | | Clean up the includes too while we are at it. Task-number: QTBUG-63058 Change-Id: I36eaaa5fc18219ca271b6bea8425ac8cc7cb8b6d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | kms: Rename the plane index workaround vars appropriatelyLaszlo Agocs2017-09-193-21/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | ...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>
* | | Fix compilation with clang 4 on LinuxLars Knoll2017-09-151-1/+1
| | | | | | | | | | | | | | | Change-Id: I7fdafeced7cdef7a97b4e004e9302cb2f1e6f258 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | eglfs_kms: Add headless mode for DRM render nodesLaszlo Agocs2017-09-056-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-054-24/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | { "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_kms: Add support for formats other than XRGB8888Laszlo Agocs2017-09-052-10/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Skip modesetting when current is good enoughLaszlo Agocs2017-09-051-25/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...unless explicitly requested via QT_QPA_EGLFS_ALWAYS_SET_MODE. This mirrors the behavior of the EGLDevice backend. Synchronize the "swap" behavior in other aspects too: do not retry a failing modeset until infinity, and make the (currently limited but soon enhanced) plane setup independent of the modesetting. Task-number: QTBUG-62262 Change-Id: If43c4edf09c526a3d0f566994a3d632c217d2c31 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs_kms: Lift the one window per screen ever limitationLaszlo Agocs2017-09-053-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is still one fullscreen window per screen at a time, but there is no reason we should fail in the backend when the screen already has the gbm_surface created. If there is really another active GL window for this screen, then the base eglfs window implementation will panic anyway. This should help certain cases, where windows belonging to screen B get created for screen A and then moved (recreated) for screen B. Task-number: QTBUG-62262 Change-Id: Ia029f028d32a35e8e023f3132097ba9a919b8fe8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs_kms: remove unused codeLaszlo Agocs2017-09-054-26/+1
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-62262 Change-Id: If21cbfcda2decf7bd70cf56695ee1d676cbaa55f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | eglfs_kms: Remove useless log entry for each QOffscreenSurfaceLaszlo Agocs2017-09-051-1/+0
|/ / | | | | | | | | | | Task-number: QTBUG-62262 Change-Id: Id5225737f619d3f0d980e8b67de92f30dc62e8a6 Reviewed-by: Andy Nichols <andy.nichols@qt.io>