summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-235-18/+18
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate projectsAlexandru Croitor2020-09-222-0/+60
| | | | | | | | | Clean up the state of the projects, before changing the internal CMake API function names. Task-number: QTBUG-86815 Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake Build: Fix libdrm detection and compilation on QNXCristian Adam2020-08-192-0/+14
| | | | | | | | | | | | On QNX 7.1 x86drm.h is located under <...>/usr/include/libdrm, unlike linux where it's present under /usr/include. find_path would not find it on QNX, and instead get /usr/include from host, which resulted in a failure to compile. Task-number: QTBUG-83202 Change-Id: I03d6c2d4dfbe91bb70df0a322e84890bd7c8548a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove last remaining bits of QtPlatformHeadersTor Arne Vestbø2020-08-048-79/+10
| | | | | | Task-number: QTBUG-84220 Change-Id: I951e04bfe9358a99951d1d61ff47b675584b7f81 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* eglfs_kms: Do not skip the initial SetCrtcLaszlo Agocs2020-08-031-8/+3
| | | | | | | | | | | | | | Trying to be clever seems to cause issues on some systems, for example AMD (RADV) on Ubuntu 20.04 gives totally garbled output by default. Remove the undocumented ALWAYS_SET_MODE env.var. as well, it won't have much of a purpose since we'll in effect hit the SetCrtc path always now once on startup. Change-Id: Ibaa463ff913eb0c1251d6d3435aa4799fe5c8a29 Fixes: QTBUG-85797 Pick-to: 5.15 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: Prevent printing a warning in every widget-based appLaszlo Agocs2020-08-031-5/+1
| | | | | | | | | | | | Attempting to reflect reality with the value of AA_ShareOpenGLContexts was a valiant attempt, but it is not possible to do setAttribute without getting a warning now once QGuiApplication is constructed. So just leave the attribute as is, changing its value is not strictly required. Fixes: QTBUG-85796 Pick-to: 5.15 Change-Id: I0f0f981bb4883856b216b2a9aad3b5bf2d7da01a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add QEvdevKeyMapper platform interfaceTor Arne Vestbø2020-07-202-24/+18
| | | | | | Task-number: QTBUG-84220 Change-Id: I4f3a54415c5509b4bde486b54c56b0e05976bac6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move eglconvenience to QtGuiFriedemann Kleint2020-07-1316-20/+18
| | | | | | | Task-number: QTBUG-83255 Change-Id: I8a008d8906308dd73a0793db5b88d3a1b6fdaf5c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix sporadic build failures of eglfs_kms_vsp2Joerg Bornemann2020-07-131-0/+1
| | | | | | | | | | The eglfs_kms_vsp2 subproject depends on eglfs_kms_support. Add the missing build dependency. Pick-to: 5.15 Fixes: QTBUG-85486 Change-Id: I1110d0f02166d9cdec1d734de679e2d36c6b026a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-073-5/+5
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use QList instead of QVector in pluginsJarek Kobus2020-07-0613-18/+18
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic86f4a3000592a1c9ae62e4a83f4fe39832a6b24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Make QtPlatformHeaders a private moduleTor Arne Vestbø2020-07-066-3/+8
| | | | | | | | | | | The APIs will be reintroduced as part of the new platform interface API where appropriate. Clients that still depend on the platform headers can include it via QT += platformheaders-private. Change-Id: Ifbd836d833d19f3cf48cd4f933d7fe754c06d2d9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix no-OpenGL build after introducing QOpenGLContext platform interfaceTor Arne Vestbø2020-07-031-0/+2
| | | | | | Change-Id: I355f43c200adb3a12e71e0b02aa10060672bb9e4 Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Introduce platform API abstraction for QOpenGLContextTor Arne Vestbø2020-07-024-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is available by including qopenglcontext.h as usual, but scoped in the QPlatformInterface namespace. The namespace exposes platform specific type-safe interfaces that provide: a) Factory functions for adopting native contexts, e.g. QCocoaGLContext::fromNative(nsContext, shareContext); b) Access to underlying native handles, e.g. openGLContext->platformInterface<QCocoaGLContext>->nativeContext() c) Platform specific functionality, e.g. static QWGLContext::openGLModuleHandle() openGLContext->platformInterface<QEGLContext>->doSomething(); The platform interfaces live close to the classes they extend, removing the need for complex indirection and plumbing, and avoids kitchen-sink modules and APIs such as the extras modules, QPlatformFunctions, or QPlatformNativeInterface. In the case of QOpenGLContext these platform APIs are backed by the platform plugin, so dynamic_cast is used to ensure the platform plugin supports the requested interface, but this is and implementation detail. The interface APIs are agnostic to where the implementation lives, while still being available to the user as part of the APIs they extend/augment. The documentation will be restored when the dust settles. Task-number: QTBUG-80233 Change-Id: Iac612403383991c4b24064332542a6e4bcbb3293 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move the EDID parser into QtGuiFriedemann Kleint2020-07-018-8/+5
| | | | | | | | | As a drive by, fix recursive inclusion in qxcbscreen.h. Task-number: QTBUG-83255 Change-Id: Ia008921b559ef450c07aa17ca554c6b35e0a88bd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Enable access to the VAO resolvers through QOpenGLContextPrivateGiuseppe D'Angelo2020-06-221-2/+1
| | | | | | | | | | | | | | | | | | | This is a commit in preparation for an upcoming change in QtQuick. We want to store the resolved functions for managing VAOs somewhere; the "least worst" choice is next to the all other function resolvers, which are in QOpenGLContext(Private). To avoid moving the VAO resolvers themselves, leave a hook in QOGLCPrivate, similar to e.g. the texture function resolvers. The hook gets populated when the VAO resolvers for a given context are requested. This removes memory management burden from the users of those functions (again, just like other function resolvers), and makes the initialization of the functions automatic. Change-Id: I0eba30a85bf8ad82946a5d68e91009d8b4bd91cf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move UNIX themes into QtGuiFriedemann Kleint2020-06-224-4/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: I9e3aecd8e172b60121f472c840eaf2a5538af438 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Move UNIX services into QtGuiFriedemann Kleint2020-06-184-4/+2
| | | | | | Task-number: QTBUG-83255 Change-Id: I95cd25c6e18ffb46955acc76d6cab551d1c8f5ae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move Unix font databases into QtGuiFriedemann Kleint2020-06-154-4/+2
| | | | | | Task-number: QTBUG-83255 Change-Id: Id85a1e0f3de371951783fe97485158c4a02e1f15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move the UNIX event dispatchers into QtGuiFriedemann Kleint2020-06-104-4/+2
| | | | | | Task-number: QTBUG-83255 Change-Id: I7d32eb1ec01784c9ed6bf5fc4913ffc5b3a34a49 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-082-2/+2
| | | | | | | Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Regenerate src/pluginsAlexandru Croitor2020-05-292-34/+31
| | | | | Change-Id: Icceceeb42023e7fa5edf320bb21f03d11bd357b7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Move QtPlatformCompositorSupport into QtOpenGLTor Arne Vestbø2020-05-286-8/+7
| | | | | | Task-number: QTBUG-83255 Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QtVulkanSupport into QtGui and QtOpenGLTor Arne Vestbø2020-05-223-6/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* eglfs: Send proper enter/leave events when multiple screens are in useShawn Rutledge2020-05-113-7/+19
| | | | | | | | | | | | | | | | | | | | Given that there is only one mouse (which might change some day, but hasn't yet), there can only be one window containing the mouse, regardless of which screen it's on. The implementation before was only able to send enter/leave events when moving from one window to another on the same screen; but we need the enter/leave events to be sent when moving between two full-screen windows on two screens as well. Also send an enter event the first time the mouse moves, to whichever window that happens to be. A Wayland compositor that renders its own cursor will need to know which screen is in use at the beginning. Pick-to: 5.15 Fixes: QTBUG-83973 Task-number: QTBUG-55161 Task-number: QTBUG-79924 Change-Id: Ie6f36cd33b103955a70bac73c1485bf475c08468 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix crash in QEglFSKmsGbmCursor::setPos() when cursor is disabledShawn Rutledge2020-05-051-1/+1
| | | | | | | | | | This happens when there are two screens (configured in the json file), QT_QPA_EGLFS_HIDECURSOR is set, and the mouse moves to the secondary screen: m_bo is null. Pick-to: 5.15 Change-Id: I5cef9835e7c9a6a39264bf9a028bf1feeabc6995 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CMake: Regenerate projects to match updated plugin APILeander Beernaert2020-04-274-4/+4
| | | | | Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-161-1/+3
|\ | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
| * Make it possible to set the EGL_DEFAULT_DISPLAYAndy Nichols2020-03-131-1/+3
| | | | | | | | | | Change-Id: I564f1ce72501bc12b960c87c953343fd64ee9011 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Initial cleanup of qevent.h for Qt6Allan Sandfeld Jensen2020-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Takes care of the first round of todos and deprecations for Qt6 in qevent. Not touching anything that might interfere with changing the class hierarchy as the file also suggest. Change-Id: If72d63d8932f1af588785bf77b34532358639a63 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | CMake: Fix X11 and xkb library usage in the platform projectsAlexandru Croitor2020-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a prerequisite for building the bundled 3rd party libraries. Because the feature evaluation will be moved into src/CMakeLists.txt, some of the X11 packages were found in the src dir, and then a second time inside the x11-related projects. These qt_find_package calls in the x11 related projects tried to promote the imported targets to global, which failed, because they were created in a different directory scope. To avoid this, the special case qt_find_package calls are removed from the nested projects. Also, fix the mapping of some of the x11 libraries to be correct - xkbcommon_x11 was incorrectly mapped to XKB::XKB instead of the xkb common x11 library - xlib was mapped to xcb, whereas X11 is the correct CMake target Change-Id: I30781b2ecbdd478c98419b14baa0492037e49c61 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move QOpenGLVertexArrayObject from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-214-1/+6
| | | | | | | | | | | | Task-number: QTBUG-74409 Change-Id: I6442693ca2b28b3a66f0f4fb41843e1e404df32b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Move QOpenGLShaderProgram from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-201-1/+1
| | | | | | | | | | | | Task-number: QTBUG-74409 Change-Id: I20dfafc0c9bf8e2b68b03e171d70c2cb4ad2bfaf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-057-72/+50
| | | | | | | | | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-01-2913-3/+599
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/Qt5CoreConfigExtras.cmake.in src/corelib/Qt5CoreMacros.cmake src/dbus/Qt5DBusConfigExtras.cmake.in src/widgets/Qt5WidgetsConfigExtras.cmake.in Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
| * Introduce VK_KHR_display support for i.MX8 devicesLaszlo Agocs2020-01-2213-2/+592
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eglfs_viv backend has Vulkan support now. While the support code is common (lives in api/vulkan), we will not expose this for any other integration yet, without the appropriate testing. While putting this to eglfs seems unintuitive at first, it turns out that for Vivante in particular this is very useful, since we can rely on the existing framebuffer device infrastructure to solve certain problems (like the lack of vsync) The VK_KHR_display implementation of Vivante currently exhibits all the known issues of the old, fbdev-style EGL plumbing (presumably since it lives on top of that): - No vsync. This can be fixed by setting QT_QPA_EGLFS_FORCEVSYNC. - May need a manual call to fbset to set the correct resolution before launching the Qt app. - And of course it lacks all the multi-screen features provided by drm. - Plus, it seems the swapchain only supports a min/max buffer count of 1. This needs special handling in QRhi since until now we assumed that there was always at least 2 buffers available. [ChangeLog][Platform Specific Changes][Linux] Vulkan is now supported by eglfs (eglfs_viv backend) on i.MX8 devices with the Vivante graphics stack. This is done via VK_KHR_display so no windowing system is required. Task-number: QTBUG-78754 Change-Id: I7530aa026d4b904b9de83f9bdbdc4897ae770e71 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * eglfs: find correct framebuffer index even if device node is symlinkRolf Eike Beer2020-01-221-1/+7
| | | | | | | | | | | | | | | | | | | | Using the Vivante driver on a board with different device trees I found the need to let udev point me to the framebuffer actually connected to HDMI by adding a symlink. Since the extraction of the framebuffer index failed and always returned 0 the GUI still always showed up on the first framebuffer. Change-Id: Ib4aa0fdd6e85d296c17fd977921cbc78e52dcdcf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Regenerate plugin projects to get new target namesAlexandru Croitor2020-01-274-12/+12
| | | | | | | | | | | | | | | | | | And also to get the original output names (qmake's "TARGET"), so that the plugin file names are as they were in Qt 5. Change-Id: I96a060d1a81693652847857372bec334728cb549 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Post Merge FixesLeander Beernaert2020-01-241-0/+1
| | | | | | | | | | Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-2427-100/+449
|\| | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * Tidy nullptr usageAllan Sandfeld Jensen2019-12-0610-30/+30
| | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove QFlags(0), QFlags() does the same and is not deprecatedAlbert Astals Cid2019-11-292-3/+2
| | | | | | | | | | Change-Id: I254d37d37f5583e0f7a76fb42b83d234afa29b77 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-202-2/+2
| | | | | | | | | | | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * eglfs: kms: Read page flip events on a dedicated threadLaszlo Agocs2019-11-1414-43/+354
| | | | | | | | | | | | | | Task-number: QTBUG-74953 Change-Id: I9a630c9245d8b0afe40ade9199cf4f1d358275da Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * eglfs: kms: Fix hw cursor with multiple screensLaszlo Agocs2019-11-146-12/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Make threaded atomic drm workLaszlo Agocs2019-11-132-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The atomic modesetting support was not prepared for page flips being issued from different (per-screen) threads. This could be seen with the threaded render loop of Qt Quick: having a QQuickWindow per screen means having a dedicated render thread for each screen. QKmsDevice used simply instance variables to keep track of the request. This leads to the commit failing with EBUSY sooner or later. Make the atomic request and related variables thread local. This prevents failing drmModeAtomicCommit() with 2 or more screens and the threaded render loop. It does not fix other potential issues when waiting for page flips to complete, that is to be tackled separately. Task-number: QTBUG-74953 Change-Id: I2dac10d5e9bdc0cb556ac78c9643c96d40d692e4 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Post merge fixesLeander Beernaert2019-11-252-13/+9
| | | | | | | | | | Change-Id: I78d3c9687f99c0a32da04257e297e88ef0b02581 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Regenerate src/*Alexandru Croitor2019-11-146-11/+11
| | | | | | | | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate everything under ./srcAlexandru Croitor2019-11-125-7/+0
| | | | | | | | | | | | | | Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Regenerate a bunch of projects after pro2cmake changesAlexandru Croitor2019-11-122-25/+27
| | | | | | | | | | | | Change-Id: I675a068411785364915a074ca0e631fec944d228 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>