summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/kms/qkmsintegration.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add a function for QPA plugins to explicitly destroy QScreensGiulio Camuffo2014-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Previously QPlatformScreen was automatically deleting its QScreen in ~QPlatformScreen(). That means that we cannot use QScreen's methods when the screen is being removed, because doing so would call virtual methods of QPlatformScreen. By that point the QPlatformScreen subclass object does not exist anymore, and we call the default implementation instead of the subclassed one, or get a crash for the pure virtual methods. This happens for example when removing a screen which contains a QWindow with some QML item using QQuickScreenAttached. This patch adds a QPlatformIntegration::destroyScreen() function, which deletes the QScreen and later the QPlatformScreen. ~QPlatformScreen will still delete the QScreen if it was not deleted with destroyScreen(), so code not ported to the new approach will continue to work as before, with only a warning added. Task-number: QTBUG-41141 Change-Id: Ie4a03dee08ceb4c3e94a81875411f6f723273fe1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* kms: Support QOpenGLWidget and QQuickWidgetLaszlo Agocs2014-09-301-0/+42
| | | | | | | | | Also fixes the handling of shareContext() for contexts and format() for windows and makes QOffscreenSurface working. Change-Id: I3c3374a9de14a5b8428de3e11d9d7e1285c5b9c7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* kms: Adapt to initialize() patternLaszlo Agocs2014-02-111-15/+21
| | | | | | | | Right now socket notifiers are attempted to be created before having the event dispatcher up. This is wrong. Change-Id: Ica3034b9fa790c037f28982db23c71342f6597d7 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Disable terminal keyboard on eglfs and linuxfbLaszlo Agocs2014-01-241-2/+3
| | | | | | | | | | | | | | | | | | | | | Unify the behavior for eglfs, linuxfb and kms. The relevant code is now moved from kms into fbconvenience. From now on, on all three platforms, terminal keyboard input is turned off by default. This feature can be disabled by setting QT_QPA_ENABLE_TERMINAL_KEYBOARD to 1. This is similar to what the evdev-based keyboard handler did in QWS in Qt4. [ChangeLog][QtGui] The main Embedded Linux platform plugins (eglfs, linuxfb, kms) are changed to behave identically with regards to terminal keyboard input: it is turned off by default on all of these platforms. If this feature is not desired, it can be disabled by setting the environment variable QT_QPA_ENABLE_TERMINAL_KEYBOARD. Task-number: QTBUG-36394 Change-Id: I69e47ed7580464dc5e703e9a0e23891c7c8b7790 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* QPA: Fix semantics of GUI event dispatcher ownership in platform pluginsTor Arne Vestbø2013-09-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPlatformIntegration::guiThreadEventDispatcher() function acted as an accessor to event dispatchers created in the constructor of each platform plugin, but the logic and semantics of event-dispatcher handling in Qt itself (QCoreApplication/QGuiApplication) still assumed both ownership and control over the event dispatcher, such as when to create one, which one to create, and when to delete it. This conflicted with the explicit calls in the platform plugins to QGuiApplication::setEventDispatcher(), as well as left a possibility that the event-dispatcher created by the platform plugin would never be deleted, as none of the platform plugins actually took full ownership of the dispatcher and deleted it in its destructor. The integration function has now been renamed back to its old name, createEventDispatcher(), and acts as a factory function, leaving the logic and lifetime of event dispatcher to QtCoreApplication. The only platform left with creating the event-dispatcher in the constructor is QNX, where other parts of the platform relies on having an event-dispatcher before their initialization. We then need to manually take care of the ownership transfer, so that the event-dispatcher is still destroyed at some point. Change-Id: I113db97d2545ebda39ebdefa865e488d2ce9368b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Added automatic input device discovery to kms plugin.Samuel Rødal2013-08-061-0/+12
| | | | | | | | | Similar to what the EGLFS plugin does, to avoid having to explicitly specify which device to use for keyboard and mouse. Change-Id: I00502be8c767487490f3fd36fb06d3eb56548ada Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Find primary GPU onlyPier Luigi Fiorini2013-08-061-1/+1
| | | | | | | | | | | | Some systems may have multiple DRM devices attached to a single seat and we are not guaranteed to pick up the primary GPU. With this flag we can control how DRM devices are detected and consider only the primary GPU. This is very useful for the kms plugin or QtCompositors running on kms in order to use the right DRM device. Change-Id: I8b91e78f148b25aaa4e40724e39e0ed0918ca100 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Use QUDeviceHelper instead of custom code.Hannu Lyytinen2013-06-081-11/+20
| | | | | | | Avoid duplicating udev handling code here. Change-Id: I054b6616ead57aa8947dcf942177dfc8a14a00fe Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Disable tty keyboard in kmsLaszlo Agocs2012-07-251-0/+3
| | | | | | | | Set QT_KMS_TTYKBD=1 to prevent this and keep vt switching, ctrl-c, input appearing on the tty, etc. working. Change-Id: I0071685205ae9e02536dcb71f6fef6495c48f8fb Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix keyboard input in kmsLaszlo Agocs2012-07-251-1/+3
| | | | | | | The window was not made active. Change-Id: I20c323201be71fa4deb758e4a8fc32297d6faf0c Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Disable threaded rendering with kms pluginLaszlo Agocs2012-07-201-2/+1
| | | | | | | | The page flip handling in QKmsScreen cannot currently cope with contexts on multiple threads. Change-Id: I9492095fec52fd1ad0197db00b3d6a2f58016e6d Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fixed KMS y-invertedness.Samuel Rødal2012-05-291-1/+2
| | | | | | | Upgrade to new gbm_surface API which lets us use eglCreateWindowSurface. Change-Id: I4af86d442375017ae3b4744e7b3bdebf3b496b6e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Compile fix for kms platform plugin.Samuel Rødal2012-05-241-1/+0
| | | | | Change-Id: Ieed141c390920d118f8bb34fa884574ba308d23e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Use the new udev based framework for detecting graphics cards.Hannu Lyytinen2012-04-131-13/+14
| | | | | | | | Get rid of hard coded device node and support any number of graphics cards. Change-Id: I50f07fb1e6ea321a4ae751db8fb49ab439dce51e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Add support for QPlatformNativeInterface.Hannu Lyytinen2012-04-111-1/+8
| | | | | | | Initial bits to enable figuring out the EGL display and context. Change-Id: I4b578e356dceb40b4456f0590d32c8df1f51fa53 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QPlatformPrinterSupport usageJohannes Zellner2011-11-291-7/+0
| | | | | | | QPlatformPrinterSupport seems to not exist anymore. Change-Id: I142ce99877620e0b678fd6693bc72257ca230e4f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Copy core GL functionality to QtGui with QGL -> QOpenGL naming.Samuel Rødal2011-08-291-2/+2
| | | | | | Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Introduce new platform capability ThreadedOpenGL.Samuel Rødal2011-08-261-0/+1
| | | | | | | | | | | | | Lets the platform plugin advertise whether it's safe to use OpenGL from a different thread. With XCB we only advertise this if we have a reasonably new XCB libary, as older versions suffer from the xcb_wait_for_reply() blocking bug, which cause GL rendering in a separate to stall when using Mesa drivers. Change-Id: I4829df7e583a1c8aed218ae13a159d21266cc594 Reviewed-on: http://codereview.qt.nokia.com/3613 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Initial support for Qt using Kernel Mode-setting (KMS)Andy Nichols2011-08-041-0/+138
This platform plugin supports fullscreen OpenGLES2 windows on devices that support Kernel Mode-setting. Change-Id: I7d4077319654c13851f0ff7ec0228b7b13936382 Reviewed-on: http://codereview.qt.nokia.com/2516 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>