summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/kms
Commit message (Collapse)AuthorAgeFilesLines
* remove unnecessary beginPaint and endPaint overridesShawn Rutledge2013-09-162-5/+0
| | | | | | | | | | | | | QPlatformBackingStore::endPaint does not take a QRegion parameter. 6ce6b8a378b0d97ba950240ffb048a4b7e485235 set the API, but the platform implementations were not all synced up since then. There was anyway no point in overriding beginPaint and endPaint on platforms which don't need to do anything there. This fixes clang warnings of the form QXcbBackingStore::endPaint hides overloaded virtual function Change-Id: Id6cd0fc2c831a34576ac2c73eeb0d5741d26e622 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix malformed assignment in QKmsScreenLaszlo Agocs2013-09-101-1/+1
| | | | | | Change-Id: Ic78160d27b2c768054feefe6ec3fd4aaf8280c83 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Andy Nichols <andy.nichols@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>
* Bump QPA-API-version.Friedemann Kleint2013-07-231-1/+1
| | | | | | | | | | | Changes f5dbc876378ae58a7bdfe1e9664fc81caca18dfb (Use QUrl in QFileDialog API) and c96a6ab627100452864eb4d8da973300401c1bfa (Pass argc, argv to platform plugin) introduced changes to the plugin API. Task-number: QTBUG-29396 Change-Id: I46ee22d16f045b69f141dc6c982017586efef662 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Use QUDeviceHelper instead of custom code.Hannu Lyytinen2013-06-089-452/+29
| | | | | | | Avoid duplicating udev handling code here. Change-Id: I054b6616ead57aa8947dcf942177dfc8a14a00fe Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* KMS QPA Plugin: use preferred mode when selecting modeanknight2013-02-181-4/+8
| | | | | | | | | | This should select the best mode (likely the currently running mode) for the display instead of the first one found. The built-in mode was left as a fallback. Change-Id: I4e1bc798df6f310b001566ab76cb9def3224a7ed Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* KMS QPA Plugin: use GBM cursor writeranknight2013-02-182-56/+19
| | | | | | | | | GBM provides a way to write directly to a buffer object that gets set as the drmMode cursor. This eliminates the need to create a GL texture and opens this class up to platforms that support GBM but not OpenGL. Change-Id: I7297827387ef9a717a5287b5484f14c9987b4158 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* KMS QPA Plugin: .pro file improvementsanknight2013-02-181-2/+3
| | | | | | | | - Use qtHaveModule to check for OpenGL - Add __GBM__ to pick up the correct native types in the Mesa EGL headers Change-Id: Idfc0e81e95672b08ba8f259b9d7edf2b25fd1bad Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2225-25/+25
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1825-25/+25
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Regression: Fix setting of custom cursors for native widgets.Friedemann Kleint2013-01-211-2/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | Currently, there is no concept of not having a cursor set on a Window. Qt::ArrowCursor is always set instead. This causes bugs when native child widgets are involved, for example setting a cursor on the native widget's parent no longer works since the child's Qt::ArrowCursor applies. Introduce QWindowPrivate::hasCursor tracking whether a cursor has been explicitly set and clear in QWindow::unsetCursor(). Handle 0 in QPlatformCursor::changeCursor() to mean "unsetCursor()": - Windows: Introduce default constructor for QWindowsWindowCursor meaning "0". Search for applicable parent cursor in applyCursor. - XCB: No big changes required, set XCB_CURSOR_NONE for no cursor. - Other platforms: Assume Qt::ArrowCursor when cursor = 0 is passed for now. Task-number: QTBUG-28879 Change-Id: Id82722592f3cd5fe577a5b64dcc600c85cfea484 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add PLUGIN_CLASS_NAME to qtbase pluginsMiikka Heikkinen2012-12-101-0/+1
| | | | | | | | Needed for automating static plugin loading. Task-number: QTBUG-28131 Change-Id: Icd993c0fc8335f29aeec30e853a408d888069399 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* beef up qt_plugin.prfOswald Buddenhagen2012-11-011-4/+2
| | | | | | | it now defines the DESTDIR and creates an INSTALLS rule. Change-Id: I15a462ccad9acbe3521c352fa98327825dc27c05 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2225-601/+601
| | | | | | | | 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>
* kms: Restore VT settings when crashedLaszlo Agocs2012-08-102-2/+29
| | | | | | | | | | This does the job of keeping the terminal keyboard working when the application segfaults but is somewhat unsafe because ioctl() is not async-signal safe. Change-Id: Ie6728a4252e18c29bba8f8308e6c00d4a1eb6a8e Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Properly manage window geometry in kmsLaszlo Agocs2012-08-072-4/+9
| | | | | | | | | | | If QWindow::setGeometry() is called before QWindow::create(), QKmsWindow::setGeometry() is not called at all. This is wrong because there is some special size restricting happening there which must never be skipped. Change-Id: I321632d4fdb327b0a75e6791c019b3f4c2793888 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-031-1/+1
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Disable tty keyboard in kmsLaszlo Agocs2012-07-255-2/+150
| | | | | | | | 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>
* Update only dirty areas in kms backingstoreLaszlo Agocs2012-07-252-3/+36
| | | | | | | | | | Do not upload the entire (typically fullscreen) image all the time. Taken from eglfs' backingstore implementation. Change-Id: I53db5cf54577ebea715d6cbd7215b9d2154e8960 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add basic backingstore implementation to kmsLaszlo Agocs2012-07-232-4/+130
| | | | | | | | | | | | | | This allows using the kms plugin in QWidget apps having a single (preferably fullscreen) top-level widget. Based on eglfs' implementation. Dirty rectangle tracking is missing, should be added later. There is no composition so multiple TLWs will not work nicely. Change-Id: Ia78589d1a375925ebdcc46aa20fc1619ec14d6cc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
* release and clear next_bo when pageFlip failsElvis Lee2012-07-211-0/+4
| | | | | | | pageFlip failure makes starvation in waitForPageFlipComplete. Change-Id: Ifbcdda2a4138753f475e4c37767058014cc4230b Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Implement nativeResourceFunctionForContext for kmsElvis Lee2012-07-202-0/+25
| | | | | | Change-Id: I4e0486744f4c3eb711a9252c90b0d06c5bb3c670 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Reset drm cursor position if cursor image is set before movedLaszlo Agocs2012-07-202-1/+7
| | | | | | | | Do not let the cursor appear at some random position and then jump back to the top-left corner when first moved. Change-Id: I0b77763bdfa86c23435d6cc07bdc13dfcc682567 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Hide drm cursor when exitingLaszlo Agocs2012-07-202-0/+7
| | | | | Change-Id: Ib4e1895dcf3e0168eb759fbecee499d75dd45bfe 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>
* Move QWindowSystemInterface out of qpa.Stephen Kelly2012-07-191-1/+1
| | | | | | | | Public QtTest headers require it, so all unit tests would have to use private Qt headers otherwise, which is not practical. Change-Id: I5d4466ec30b6a57ebdfc34413e716e657eb51368 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Follow gbm api changes in kms pluginLaszlo Agocs2012-07-182-5/+3
| | | | | Change-Id: I3058f4d3540b04710a853bbaa901bdbecf35b4b5 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Tear down properly in kms plugin when exitingLaszlo Agocs2012-07-181-0/+8
| | | | | Change-Id: Idad060af4a8b4e68c2312cc2b69de39d2a58a1c4 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Suppress QWindowSystemInterface inclusion warnings.Girish Ramakrishnan2012-07-031-1/+1
| | | | | | | | | | | | | Since QWindowSystemInterface is now part of QPA API. The correct inclusion is: #include <qpa/qwindowsysteminterface.h> #include <qpa/qwindowsysteminterface_p.h> Bulk of the work was done by: find . -type f | xargs sed -i -e 's,#include <\(QtGui/\)\?QWindowSystemInterface>,#include <qpa/qwindowsysteminterface.h>,g' Change-Id: If75fc32611e72ef1cf58505794def375b1acf74a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add QPA prefix and version number to QPA plugin factory interfaces.Friedemann Kleint2012-06-271-1/+1
| | | | | | | The interfaces may change in Qt minor versions. Change-Id: I43bc6245ddbba8232e00313bdc64e8e60c7eab6f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove the QFactoryInterface dependency from platform pluginsLars Knoll2012-06-081-8/+0
| | | | | Change-Id: I4010e59dcd8a790e06bb9a0ccf3cc9a5c7737ed1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Verify the surfaceType before activating the GL contextHolger Hans Peter Freyther2012-06-051-0/+2
| | | | | | | | | | | | Verify that the surfaceType() of the QPlatformContext is of type OpenGLSurface before making the context active. Make it possible to get the QSurface from a QPlatformSurface, make QPlatformWindow use that to access the QWindow. Remove the setSurfaceType call from the eglfs plugin as this hiding a problem. Change-Id: I08906da052e066bb1f1f042030643c6389ab17d7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* KMS platform plugin: Introduce default cursor for better usability.Samuel Rødal2012-05-301-0/+8
| | | | | | | | Similar to the default cursor in eglfs, not having it makes it hard to interact with Qt applications using the evdevmouse plugin. Change-Id: I9638267c7d790d91b66620e4a82d86f299061922 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Fixed KMS y-invertedness.Samuel Rødal2012-05-2912-447/+177
| | | | | | | 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-242-1/+2
| | | | | Change-Id: Ieed141c390920d118f8bb34fa884574ba308d23e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Compile fix for kms plugin.Samuel Rødal2012-05-091-1/+0
| | | | | | Change-Id: I0ad9716273a7beb643fab5fafc7fcf4884c8a364 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-078-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QPA plugins]Thiago Macieira2012-05-041-2/+2
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I4aef078ea87ecd3699de107d1e9352d9fb6d6e39 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Use the new udev based framework for detecting graphics cards.Hannu Lyytinen2012-04-135-17/+157
| | | | | | | | 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>
* Implement basic bits for device autodetection via udev.Hannu Lyytinen2012-04-135-3/+305
| | | | | | | | | The graphics cards and eventually the input devices need to be resolved via udev. This commit adds a listener class and an abstract base class for writing device specific handlers. Change-Id: I62784c98bc7ad4bc1431d61cd5f13c8b48edf330 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Add support for QPlatformNativeInterface.Hannu Lyytinen2012-04-115-3/+188
| | | | | | | Initial bits to enable figuring out the EGL display and context. Change-Id: I4b578e356dceb40b4456f0590d32c8df1f51fa53 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Use correct framebuffer object.Hannu Lyytinen2012-04-112-0/+9
| | | | | | | | KMS plugin deals with FBO IDs not equal to zero (the default FBO), so return the correct ID. Change-Id: I904fc0b8d732f856b4526bd7f73cc48c358c8441 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Release the EGL context after initialization.Hannu Lyytinen2012-04-111-0/+2
| | | | | | | | Threaded applications like qmlscene could not bind the EGL context if the context is already bound in the other thread. Change-Id: Ia75ef9e76ebff48aa2c9b348101ab2f388e18c5e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Use the new plugin system in the KMS plugin.Hannu Lyytinen2012-04-113-16/+14
| | | | | | | Sync up the KMS QPA plugin with the plugin system changes. Change-Id: Ifaa8be6f11aeb93acc63643c62ca15db4e9bc38f Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* misc: Fix some random typos and grammar while reading code.Holger Hans Peter Freyther2012-03-091-1/+1
| | | | | | | | | | | | Typos: recieve -> receive descrived -> describe Grammar: this types -> these types Change-Id: Iedacc51a6322996f423ac9472af0a597424a4fed Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QCursor: Associate cursor with screen.Friedemann Kleint2012-03-073-1/+7
| | | | | | | | | | | | | | | | | | | | | | - Introduce cursor() accessor to QPlatformScreen. - Remove screen member of QPlatformCursor (a cursor can be shared by multiple screens of a virtual desktop). - Add QCursor::pos()/ QCursor::setPos() taking a QScreen-parameter, use primaryScreen() for old overloads. QCursor::pos() can then query the platform cursor for the position and return the position even if the mouse position is outside the windows owned by the Qt application. - Fix tests Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Task-number: QTBUG-22457 Task-number: QTBUG-22565 Task-number: QTBUG-20753 Change-Id: Ia69f37343f95772e934eab1cd806bd54cbdbbe51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3017-17/+17
| | | | | | | | | | 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-2317-17/+17
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>