summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/deviceintegration
Commit message (Collapse)AuthorAgeFilesLines
* QEglFSKmsGbmScreen::framebufferForBufferObject: release() at the correct timeMarc Mutz2024-04-181-2/+3
| | | | | | | | | | | | | | | It's the gbm_bo_get_user_data() function that takes ownership of the FrameBuffer object, not the caller of the function, so release() into gbm_bo_set_user_data() not into the return. This threw Coverity off, which complained about a leak of the return value in the caller. Amends 2f0fa59d5903d4c9596ed42dcbaa9da0f77c78da, but not picking through all the refactorings the code has since seen. Pick-to: 6.7 6.6 6.5 Coverity-Id: 444117 Change-Id: I5f058e4a42942349193eecfd8c00ec9499ef4886 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* drm: Fix having more than window over the screen's lifetimeLaszlo Agocs2024-03-052-1/+9
| | | | | | | | | | | | | | | | ...when not using atomic. On the non-atmic path the fb is passed in to drmModeSetCrtc. Here we need a new call to it if a new QWindow gets created after the previous one is destroyed. Previously this was not done, so it ended up with Device busy errors. Atomic does not need this since there the flip commit always contains framebufferPropertyId. Change-Id: Ie68152cad50438807ef45adfba65e74c8f30c956 Fixes: QTBUG-122663 Pick-to: 6.7 6.6 6.5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* drm: atomic: Avoid device busy when flipping after creating a new windowLaszlo Agocs2024-03-051-2/+6
| | | | | | | Task-number: QTBUG-122663 Change-Id: I168930428e8d09a9a042401460d678e20f3b82d5 Pick-to: 6.7 6.6 6.5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Introduce NO_GENERATE_CPP_EXPORTS argument for qt_internal_add_moduleAlexey Edelev2024-02-092-0/+2
| | | | | | | | | | | The argument is inverted GENERATE_CPP_EXPORTS argument. Use it explicitly for the modules that do not require the autogenerated cpp exports. Task-number: QTBUG-90492 Change-Id: Ic67772ba9ed5e40f132a97e7d6844102ad023ff3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove extra semi-colonsTasuku Suzuki2024-02-061-1/+1
| | | | | Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Egldevices: Use valid DRM handle to get platform displayAlex Bu2023-10-031-1/+4
| | | | | | | | | | Use a valid DRM handle as display attribute to get platform display. This fix is used together with the default framebuffer fix for the display issue of egldevices backend on Jetson AGX Orin devkit. Pick-to: 6.6 6.5 Change-Id: Ia1975936653461c5a7e534c714a123837c62bc10 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* eglfs: add a default framebuffer to NVIDIA eglstreamsKurt Kiefer2023-10-032-4/+61
| | | | | | | | | | | | | Newer versions of NVIDIA's DRM driver are rejecting the previously accepted but non-standard use of framebuffer_id -1 in order to set the output mode but not issue a page flip. This change adds a default framebuffer to the egldevice driver for use with the initial calls to set the CRTC mode and plane. Pick-to: 6.6 6.5 Change-Id: I63dbb6b099250fcff7d995eec38fb75c675894cd Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* eglfs: Extend GBM surface creation probingAndreas Holzammer2023-09-211-1/+16
| | | | | | | | | | Some graphics drivers do only create a surface with the help of gbm_surface_create_with_modifiers and others do require to use gbm_surface_create. So it is needed to probe these. Change-Id: I9ea657f12f2ea23ec426a378cfd67e297cb2d310 Pick-to: 6.5 6.6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Rid of 'special case' markersAlexey Edelev2023-04-131-3/+3
| | | | | | | | | | | It's unlikely we will ever use pro2cmake at this project stage, so it doesn't make any sense to keep the 'special case' markers in the CMake scripts. Remove them and replace with TODO where needed. Change-Id: I84290c20679dabbfdec3c5937ce0428fecb3e5a7 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Utilize NO_UNITY_BUILD arguments instead of manual exclusionAmir Masoud Abdol2023-03-141-2/+1
| | | | | | | | | | | Unity build is disabled by default for all 3rdparty libraries, so we don't need to set the manually anymore; and for the plugins we can use NO_UNITY_BUILD instead. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ia2f83ae083924d31adf07e7647b34ae6571ed01f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add some exclusions for CMake Unity (Jumbo) buildsFriedemann Kleint2023-02-161-0/+2
| | | | | | | | | | | | | Add exclusions for issues that are likely not fixable (3rd party code, X11 define clashes, etc) in 3rd party, tools and plugins. Pick-to: 6.5 Task-number: QTBUG-109394 Done-with: Amir Masoud Abdol <amir.abdol@qt.io> Change-Id: I698c004201a76a48389271c130e44fba20f5adf7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* src: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-1010-45/+0
| | | | | | Pick-to: 6.5 Change-Id: Id644d322a602038403bb7f46c532744575fbf6d3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* eglfs-kms/gbm: fix segfault and add qScopeGuardThomas Senyk2022-12-131-6/+13
| | | | | | | | | | | | | | | As framebufferForBufferObject has a code-path which returns a nullptr, it's vital to check on that and return early in that case. As this is the third segment in this function that does gbm_surface_release_buffer, a qScopeGuard was introduced to reduce code duplication. This also makes this function saver/easier to maintain long term. The platform on which this segfault was reported is QEMU Pick-to: 6.2 6.4 6.5 Change-Id: I5ee1ad4073712349b7475bce3a7978961fea2344 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* eglfs_kms: Prevent drm errors with more than one window during the screen's ↵Laszlo Agocs2022-12-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | lifetime The QML Live Preview tool exercises the problematic case of having a QQuickWindow, then closing it, then showing another, then destroying that, ..., and so on. It seems that the eglfs_kms backend does not handle this gracefully: if there was a page flip issued for a window that is then closed, the new window will result in drm errors (like -22 EINVAL) because the logic gets confused due to holding on to surface buffers from the old window. To remedy this, make sure the same cleanup is performed on a failing atomic commit as it is done on the non-atomic code path. In addition, reset more things in resetSurface(). Change-Id: I7e13dbbf4d74b4ed9beaf71472680a0daafb4f95 Fixes: QTBUG-82104 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* eglfs: kms: Make screen cloning functional by defaultLaszlo Agocs2022-10-282-41/+93
| | | | | | | | | | | | | | | | | | | | | | It is not necessary to disable the thread-based drm event reading (QT_QPA_EGLFS_KMS_NO_EVENT_READER_THREAD) anymore when using screen cloning. Amends 820775166132b073a941f2389fba81db49619688 and 14bb413309092adc53e8451daff5690c4698c07d Note that this does not work when atomic commits are enabled. (i.e. running with QT_QPA_EGLFS_KMS_ATOMIC=1 and attempting to use screens that clone will not function as expected, regardless of which event reading method is used - that needs a rework of how atomic requests are handled, and is not something we are going to invest into given that atomic is not even used by default) Pick-to: 6.4 Fixes: QTBUG-91882 Change-Id: Iba83688c7790d7e721db3704d422034b654a8d8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-113-4/+4
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-043-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* eglfs: Add env.var. to disable the dedicated drmHandleEvent threadLaszlo Agocs2022-09-225-15/+58
| | | | | | | | | | | | | | | | | | | | Setting QT_QPA_EGLFS_KMS_NO_EVENT_READER_THREAD=1 makes it operate like it did before 5.12.7: just calling drmhandleEvent (guarded by a mutex) on the current (main or render, depending on the QQ render loop) thread. This should not be needed and is discouraged (will certainly cause deadlocks in multiscreen setups + QQ threaded render loop on certain embedded systems), but it seems necessary to provide a way to revert back to the old way of functioning as there are reports about problems with screen cloning when the dedicated event reading thread is used. Task-number: QTBUG-91882 Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I4cddcd09149dcab9e135467b6ef0e047a2a0ecff Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix compilation with clangSona Kurazyan2022-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Amends 711105058afe68407a0ed613335a83b6181112ed and fixes the following errors: .../qeglfsx11integration.cpp:28:36: note: non-constexpr constructor 'QBasicAtomicInteger' cannot be used in a constant expression Q_CONSTINIT static QBasicAtomicInt running; ^ .../qbasicatomic.h:171:5: note: declared here QBasicAtomicInteger() = default; And: .../qoffscreenwindow.cpp:171:50: error: 'constinit' specifier missing on initializing declaration of 'm_windowForWinIdHash' [-Werror,-Wmissing-constinit] QHash<WId, QOffscreenWindow *> QOffscreenWindow::m_windowForWinIdHash; ^ Q_CONSTINIT .../qoffscreenwindow.h:44:5: note: variable declared constinit here Q_CONSTINIT static QHash<WId, QOffscreenWindow *> m_windowForWinIdHash; Change-Id: I991674826737db897e087e9e06b56b338ca61a4f Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Apply Q_CONSTINIT where beneficialSona Kurazyan2022-09-012-2/+2
| | | | | | | | | | Applied Q_CONSTINIT to variables with static storage duration, but skipped the POD types with core constant initializers. Task-number: QTBUG-100486 Change-Id: Iaabf824e9cb0f29a405a149912200d4e4b3573c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2310-10/+10
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-0310-0/+30
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* eglfs: Fix screen cloning when atomic is enabledLaszlo Agocs2022-08-011-5/+6
| | | | | | | | | | | | 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>
* Add a way to declare _exported_ logging categoriesGiuseppe D'Angelo2022-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a library declares a logging category that needs to be used by clients (e.g. via inline methods, macros, etc.), then the logging category function generated by Q_DECLARE_LOGGING_CATEGORY has to be exported. We've seen this problem with Q_NAMESPACE, Q_GADGET, etc.: these macros also declare functions or objects that in some cases need to be exported. And precisely like Q_NAMESPACE, Q_GADGET, etc., people end up relying on the implementation details of Q_DECLARE_LOGGING_CATEGORY (specifically, what does it expand to) in order to place the export directives in the right place. Introduce a more robust solution and apply it around qtbase. Cleanup some minor code as a drive-by (remove `extern` and useless semicolons). [ChangeLog][QtCore][QLoggingCategory] Added the Q_DECLARE_EXPORTED_LOGGING_CATEGORY macro, in order to allow dynamic libraries to declare a logging category that can be then used by client code. Change-Id: I18f40cc937cfe8277b8d62ebc824c27a0773de04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix typo in codeDuan Ting2022-06-231-1/+1
| | | | | | | | | Found by codespell Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I75f4b14f3eded035a0c904d8a7174cb6f5b7d9ef Reviewed-by: Wang Bo <wangbo@uniontech.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1664-2473/+169
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Plugins: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-05-041-1/+1
| | | | | | | Task-number: QTBUG-98434 Change-Id: If64c294033c114ae46dfc327c40da7f3c7a598f5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Plugins: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-042-18/+22
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* eglfs_x11: Fix running flag linkageLaszlo Agocs2022-04-271-1/+1
| | | | | | | | Pick-to: 6.3 6.2 5.15 Fixes: QTBUG-102821 Change-Id: I49db74c0d554bdf870a4521ab91d154b8a80c375 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix remaining uses of deprecated QScopedPointer::takeMårten Nordheim2022-03-151-3/+3
| | | | | Change-Id: I804aef0aabc1c1bccdf92ff8da7b6c2f5377252a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* eglfs: QNX uses own QPA plugin and not eglfsPasi Petäjäjärvi2022-03-072-14/+0
| | | | | | | | | | | | | | | | Remove compilation workarounds to get rid of warnings as those QPA plugins are not supported by QNX. warning: cast from 'void*' to 'EGLNativeDisplayType' {aka 'int'} loses precision [-fpermissive] warning: invalid conversion from 'EGLNativeDisplayType' {aka 'int'} to 'void*' [-fpermissive] Pick-to: 6.2 6.3 Task-number: QTBUG-101382 Change-Id: I515708a8869498eb91df4fcba85a7b751d13a25c Reviewed-by: Rafael Roquetto <rafael.roquetto@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* Fix run time failure for UI autotests (INTEGRITY)Tatiana Borisova2022-01-252-8/+18
| | | | | | | | | | | | | | | | - Add WFD resources release: It provides possibility to re-create native window on run time. It allows to run several Qt UI applications (one by one) without device reboot. - Fix crash that found during window re-creation: ~QOpenGLCompositorBacking() calls QOpenGLCompositor::instance(). But compositor is deleted for that moment. Task-number: QTBUG-99123 Pick-to: 6.2 6.3 Change-Id: I1e6dc9a012a166d1fd6cd1c24f9d2e9a8995fc00 Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Support to get timing from pagefilpElvis Lee2021-12-033-3/+14
| | | | | | | | | Handle the timing from drmEvent when page flip finished. The information can be used to optimize rendering timing. Change-Id: I14612ca48a8fea5208aa74949d7543787e860c5f Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* CMake: Rename qt6_add_plugin TYPE option to PLUGIN_TYPEAlexandru Croitor2021-08-068-8/+8
| | | | | | | | | | | | | The intention is to remove TYPE as a keyword completely before 6.2.0 release, but in case if that's not possible due to the large amount of repositories and examples, just print a deprecation warning for now and handle both TYPE and PLUGIN_TYPE. Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: If0c18345483b9254b0fc21120229fcc2a2fbfbf5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't give plugins PUBLIC usage requirements part 2Alexandru Croitor2021-07-155-5/+4
| | | | | | | | | | | | | Plugins shouldn't have public usage requirements. Amends 434ada8dcb6132b3a597ea56b57a66c627f51728 Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: Iffb3def07ea428b1c3c5b9873e259a4d5168b7a1 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Don't give plugins PUBLIC usage requirementsJoerg Bornemann2021-07-073-3/+3
| | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: Ibc7c2bcd3b6a9dc77df40c4c0c22ff254a80f33d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add the 'Private' suffix to the internal module namesAlexey Edelev2021-05-312-5/+5
| | | | | | | | Rename internal modules to adjust their names to the internal module policy. Also modify mappings of the qmake file converters. Change-Id: I69aee1e8136c2379608d9d22d718f8c8a5f73124 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add EGLFS OpenWFD plugin for INTEGRITYKimmo Ollila2021-05-192-1/+25
| | | | | | | | | This enables OpenWFD EGLFS integration plugin and makes EGLFS the default platform for INTEGRITY builds. Change-Id: I65332ca0ae244f40013df435828e2e359200b325 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* eglfs: Newer Nvidia libdrm provide device instead driver module namePasi Petäjäjärvi2021-04-011-1/+6
| | | | | | | | | | | | In newer Nvidia proprietary libdrm binaries display device name is actual device and not driver module name. Check which provided device name has been returned with EGL_DRM_DEVICE_FILE_EXT to choose correct function to open device. Pick-to: 5.15 Fixes: QTBUG-91184 Change-Id: I95f907dfa30057da0dca4ff32e0605c6bb10e0a5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Support additional gbm surface flagsElvis Lee2021-03-122-2/+4
| | | | | | | | Some vendor requires more gbm surface flags for specific purpose, such as protected content. Change-Id: Ie7db337e05f941b5480ffaccf61fbc94eb989ffc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Support EGL protected content extensionElvis Lee2021-03-091-1/+15
| | | | | | | | | | | | | | | | | | | | A protected context is required to allow the GPU to operate on protected resources, including protected surfaces and protected EGLImages. For example, GPU can post-process on protected content like DRM protected content so that complex, nonlinear video effects or mapping onto textures can be used. The surface format option may be relevant for DirectX and Vulkan in the future: https://microsoft.github.io/DirectX-Specs/d3d/ProtectedResources.html https://www.khronos.org/registry/vulkan/specs/1.1-khr-extensions/html/chap12.html#memory-protected-memory Change-Id: I2d155f0e68b830276690b4833b22a2bc452cdcad Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Long live VK_KHR_display platform plugin!Laszlo Agocs2021-02-082-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Experiment with this once again, this time in a more forward looking manner: move the code previously placed into eglfs's eglfs_viv backend into its own plugin. Move our attention to devices like the Raspberry Pi 4, where VK_KHR_display has recently been introduced to the Mesa v3dv backend. This is not in Mesa 20.3.3, the latest release at the time of writing, but is available and functional when building master. This serves as the reference system for testing the plugin, because it looks like a fairly robust implementation. The sole thing the plugin enables at the moment is creating a QVulkanInstance and a QWindow with surfaceType VulkanSurface. This is sufficient to run plain QWindow+QRhi (with QRhi::Vulkan), Qt Quick, and Qt Quick 3D (with QSG_RHI_BACKEND=vulkan) applications. One display and mode is chosen, by default the first in the enumeration lists reported by the Vulkan extension. This can be overridden with QT_VK_DISPLAY_INDEX and QT_VK_MODE_INDEX (modeled after QT_VK_PHYSICAL_DEVICE_INDEX). The indices can be determined based on the logs printed to the debug output. Changing the mode seems to be working nicely with v3dv. Multiple screen setups, where there would be more than one VkDisplayKHR enumerated, have not been tested yet. Regardless, multiple screens (reporting more than one QScreen, with a different QWindow on each, eglfs style) are not currently supported. This may be improved later (while keeping in mind that VK_KHR_display does not have a fully-featured output management API). Multiple (non-fullscreen) windows and especially raster windows (QWidget) are not and will not be supported. Our single QWindow is always forced to fullscreen. When it comes to input, the level of support should match linuxfb and eglfs. Note that while mouse input is fully functional, there is no mouse cursor. (and this is unlikely to be implemented) [ChangeLog][Platform Specific Changes][Embedded Linux] Introduced a vkkhrdisplay platform plugin to run Vulkan-based applications in fullscreen, without a windowing system, on systems where VK_KHR_display and VK_KHR_display_swapchain are supported by the Vulkan implementation. Change-Id: I6388416f7fb2bfdc4b412a0a4971f25cc05d4668 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: kms: Log gbm bo handle and stride as wellLaszlo Agocs2021-02-081-1/+2
| | | | | | Pick-to: 6.1 Change-Id: Ie345a3f4a4ab0407e3c532c6385ae31ca698d628 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* eglfs: Use drmClose in drm/EGLDevice backendLaszlo Agocs2021-01-181-1/+1
| | | | | | | Pick-to: 6.0 5.15 Fixes: QTBUG-90350 Change-Id: I29a71e4abc2df7b777a895792bc5385a89223895 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-123-93/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-0715-303/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* eglfs: Enable building the fbdev-based Mali backendLaszlo Agocs2020-12-282-1/+27
| | | | | | | | | The configure tests are all in place for CMake as well, and this one has no special library depdendencies. Generate the CMakeLists and remove the special case. Change-Id: I55817045f9e259515fb3aad33d1446d9413111d9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Re-generate project files in srcJoerg Bornemann2020-11-302-5/+0
| | | | | | Pick-to: 6.0 Change-Id: I1f5f822d68129490f1a7c495f718aead0b520ca9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Correct headers to build with eglfs modulesElvis Lee2020-11-1714-22/+8
| | | | | | | | | | | | | | To build with eglfs module and gbm device integration module, some headers should consider global path, not local. This covers eglfs_kms and eglfs_kms_egldeivce device integration. Other device integrations might be future work if needed. Task-number: QTBUG-85268 Change-Id: I1bad5fbac99aa79d146e90f88b53519b09254e13 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
* Remove usages of Q_FOREACHAllan Sandfeld Jensen2020-11-021-5/+5
| | | | | | | The last places outside tests, tools and qnx platform code Change-Id: I9918861888cf58bf5dbae5603febb8885fc67709 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>