From f1b4bd4790860e1ff5afcec111a359bc3a91cfda Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Tue, 15 Nov 2016 20:09:47 +0100 Subject: eglfs: fix eglfs_mali compile for odroid-mali Avoid duplicated struct fbdev_window definition (introduced by commit 58bed4cda98e8e25db8adc61c7db73b6853077dc) by renaming the local shadow definition to struct shadow_fbdev_window. Task-number: QTBUG-57156 Change-Id: I72b03f09fc57ddcd0284d6d3554a5658e02b80fc Reviewed-by: Laszlo Agocs Reviewed-by: Julien Corjon --- .../eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp index 43decdf849..aeba83f9bf 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp @@ -42,7 +42,7 @@ QT_BEGIN_NAMESPACE -struct fbdev_window { +struct shadow_fbdev_window { unsigned short width; unsigned short height; }; @@ -85,7 +85,7 @@ EGLNativeWindowType QEglFSMaliIntegration::createNativeWindow(QPlatformWindow *w Q_UNUSED(window); Q_UNUSED(format); - fbdev_window *fbwin = reinterpret_cast(malloc(sizeof(fbdev_window))); + shadow_fbdev_window *fbwin = reinterpret_cast(malloc(sizeof(shadow_fbdev_window))); if (NULL == fbwin) return 0; -- cgit v1.2.3 From cff48c7845ccf51ac53a550a43dec78428124f70 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 21 Nov 2016 12:46:46 +0100 Subject: eglfs: Avoid unexpectedly flushing QPA input events Flushing all events to ensure that the expose (or other queued events) get processed right away is dangerous. Instead, pass ExcludeUserInputEvents like many other platform plugins do. This way queued input events do not get processed at an unexpected point in time and so do not interfere with modal dialogs for instance. Task-number: QTBUG-57229 Change-Id: I9da09e62627d26485fb5a37fc190cb4a4bcb28b6 Reviewed-by: Andy Nichols --- src/plugins/platforms/eglfs/qeglfsintegration.cpp | 2 +- src/plugins/platforms/eglfs/qeglfswindow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp index bb62506f33..2a6f3aa7cf 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp @@ -176,7 +176,7 @@ QPlatformBackingStore *QEglFSIntegration::createPlatformBackingStore(QWindow *wi QPlatformWindow *QEglFSIntegration::createPlatformWindow(QWindow *window) const { - QWindowSystemInterface::flushWindowSystemEvents(); + QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); QEglFSWindow *w = qt_egl_device_integration()->createWindow(window); w->create(); if (window->type() != Qt::ToolTip) diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp index 84856831c3..3cc7079fbb 100644 --- a/src/plugins/platforms/eglfs/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp @@ -208,7 +208,7 @@ void QEglFSWindow::setVisible(bool visible) QWindowSystemInterface::handleExposeEvent(wnd, QRect(QPoint(0, 0), wnd->geometry().size())); if (visible) - QWindowSystemInterface::flushWindowSystemEvents(); + QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); } void QEglFSWindow::setGeometry(const QRect &r) -- cgit v1.2.3 From 1670bc751e7f7f3fddf92870b9a4da5f38ab93a9 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 1 Dec 2016 10:51:13 +0100 Subject: eglfs: make it possible to configure the EGLStream FIFO length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting QT_QPA_EGLFS_STREAM_FIFO_LENGTH to a >= 1 value changes from mailbox to FIFO mode, with the specified length. [ChangeLog][Platform Specific Changes][Linux] Added an option to switch from mailbox to FIFO mode in eglfs' EGLStream backend. This is done by setting the environment variable QT_QPA_EGLFS_STREAM_FIFO_LENGTH to a >= 1 value, the desired length of the FIFO queue. Change-Id: Ib98e2ff805f8c00ca2e224d1db5b9c1b2c9a04f0 Done-with: Pasi Petajajarvi Reviewed-by: Pasi Petäjäjärvi --- .../qeglfskmsegldeviceintegration.cpp | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index d0c9c9565e..977b318ad9 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -129,10 +129,16 @@ void QEglJetsonTK1Window::resetSurface() qCDebug(qLcEglfsKmsDebug, "Creating stream"); EGLDisplay display = screen()->display(); - EGLOutputLayerEXT layer = EGL_NO_OUTPUT_LAYER_EXT; - EGLint count; + EGLint streamAttribs[3]; + int streamAttribCount = 0; + int fifoLength = qEnvironmentVariableIntValue("QT_QPA_EGLFS_STREAM_FIFO_LENGTH"); + if (fifoLength > 0) { + streamAttribs[streamAttribCount++] = EGL_STREAM_FIFO_LENGTH_KHR; + streamAttribs[streamAttribCount++] = fifoLength; + } + streamAttribs[streamAttribCount++] = EGL_NONE; - m_egl_stream = m_integration->m_funcs->create_stream(display, Q_NULLPTR); + m_egl_stream = m_integration->m_funcs->create_stream(display, streamAttribs); if (m_egl_stream == EGL_NO_STREAM_KHR) { qWarning("resetSurface: Couldn't create EGLStream for native window"); return; @@ -140,6 +146,16 @@ void QEglJetsonTK1Window::resetSurface() qCDebug(qLcEglfsKmsDebug, "Created stream %p on display %p", m_egl_stream, display); + EGLint count; + if (m_integration->m_funcs->query_stream(display, m_egl_stream, EGL_STREAM_FIFO_LENGTH_KHR, &count)) { + if (count > 0) + qCDebug(qLcEglfsKmsDebug, "Using EGLStream FIFO mode with %d frames", count); + else + qCDebug(qLcEglfsKmsDebug, "Using EGLStream mailbox mode"); + } else { + qCDebug(qLcEglfsKmsDebug, "Could not query number of EGLStream FIFO frames"); + } + if (!m_integration->m_funcs->get_output_layers(display, Q_NULLPTR, Q_NULLPTR, 0, &count) || count == 0) { qWarning("No output layers found"); return; @@ -159,6 +175,7 @@ void QEglJetsonTK1Window::resetSurface() Q_ASSERT(cur_screen); qCDebug(qLcEglfsKmsDebug, "Searching for id: %d", cur_screen->output().crtc_id); + EGLOutputLayerEXT layer = EGL_NO_OUTPUT_LAYER_EXT; for (int i = 0; i < actualCount; ++i) { EGLAttrib id; if (m_integration->m_funcs->query_output_layer_attrib(display, layers[i], EGL_DRM_CRTC_EXT, &id)) { -- cgit v1.2.3 From 09d481987bc94b28252923f9ab7c5b9183d7bf74 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 1 Dec 2016 13:59:15 +0100 Subject: eglfs: improve EGLStream logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make it possible to identify from the logs that QT_QPA_EGLFS_LAYER_INDEX was set, in order to help troubleshooting. Change-Id: Ic22825e5df9f0eeb31f817f398b9f6c000c3a00f Reviewed-by: Pasi Petäjäjärvi --- .../eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index 977b318ad9..b443a724ec 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -193,8 +193,10 @@ void QEglJetsonTK1Window::resetSurface() QByteArray reqLayerIndex = qgetenv("QT_QPA_EGLFS_LAYER_INDEX"); if (!reqLayerIndex.isEmpty()) { int idx = reqLayerIndex.toInt(); - if (idx >= 0 && idx < layers.count()) + if (idx >= 0 && idx < layers.count()) { + qCDebug(qLcEglfsKmsDebug, "EGLOutput layer index override = %d", idx); layer = layers[idx]; + } } if (layer == EGL_NO_OUTPUT_LAYER_EXT) { -- cgit v1.2.3 From 8d0854c2bd7cf371883726cacb3f8c8549a11eac Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 1 Dec 2016 15:51:47 +0100 Subject: eglfs: allow forcing an explicit connector index on DRM/KMS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a QT_QPA_EGLFS_KMS_CONNECTOR_INDEX environment variable that applies both to the GBM and EGLDevice backends. Instead of specifying all uninteresting outputs as "off" in the config file in QT_QPA_EGLFS_KMS_CONFIG, this variable provides a shortcut to force one single connector and ignore all others in embedded systems with a fixed connector configuration. The index must be between 0 and DRM connector count - 1. Task-number: QTBUG-57386 Change-Id: I3f9562f48bf6b2ffaf9a0cc232e09a7e0c15645b Reviewed-by: Pasi Petäjäjärvi --- .../deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp index f6b58d1ba6..b3c1fbb1bd 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp @@ -399,7 +399,20 @@ void QEglFSKmsDevice::createScreens() QVector screens; + int wantedConnectorIndex = -1; + bool ok; + int idx = qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_CONNECTOR_INDEX", &ok); + if (ok) { + if (idx >= 0 && idx < resources->count_connectors) + wantedConnectorIndex = idx; + else + qWarning("Invalid connector index %d", idx); + } + for (int i = 0; i < resources->count_connectors; i++) { + if (wantedConnectorIndex >= 0 && i != wantedConnectorIndex) + continue; + drmModeConnectorPtr connector = drmModeGetConnector(m_dri_fd, resources->connectors[i]); if (!connector) continue; -- cgit v1.2.3 From f30b88846566bc1254e5e6d61077092cdaeba409 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 2 Dec 2016 10:39:35 +0100 Subject: eglfs: allow forcing an overlay plane MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a QT_QPA_EGLFS_KMS_PLANE_INDEX environment variable that applies both to the GBM and EGLDevice backends. When set to a value between 0 and the number of planes on the connector - 1, the chosen overlay plane will be used for output, meaning there will be a drmModeSetPlane to configure, and, in case of EGLDevice, the plane's corresponding EGL layer will get chosen instead of the CRTC's. Task-number: QTBUG-57386 Change-Id: I12c89472ea5730987052f39211fadc597d1302ef Reviewed-by: Pasi Petäjäjärvi --- .../eglfs_kms/qeglfskmsgbmscreen.cpp | 37 ++++++++++++++++------ .../qeglfskmsegldeviceintegration.cpp | 15 +++++---- .../qeglfskmsegldevicescreen.cpp | 35 ++++++++++++++------ .../eglfs_kms_support/qeglfskmsdevice.cpp | 27 ++++++++++++++-- .../eglfs_kms_support/qeglfskmsscreen.h | 3 ++ 5 files changed, 89 insertions(+), 28 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp index bed775ff81..d4df0dc66e 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp @@ -181,24 +181,41 @@ void QEglFSKmsGbmScreen::flip() FrameBuffer *fb = framebufferForBufferObject(m_gbm_bo_next); - if (!output().mode_set) { - int ret = drmModeSetCrtc(device()->fd(), - output().crtc_id, + QEglFSKmsOutput &op(output()); + const int fd = device()->fd(); + const uint32_t w = op.modes[op.mode].hdisplay; + const uint32_t h = op.modes[op.mode].vdisplay; + + if (!op.mode_set) { + int ret = drmModeSetCrtc(fd, + op.crtc_id, fb->fb, 0, 0, - &output().connector_id, 1, - &output().modes[output().mode]); + &op.connector_id, 1, + &op.modes[op.mode]); - if (ret) { - qErrnoWarning("Could not set DRM mode!"); + if (ret == -1) { + qErrnoWarning(errno, "Could not set DRM mode!"); } else { - output().mode_set = true; + op.mode_set = true; setPowerState(PowerStateOn); + + if (!op.plane_set) { + op.plane_set = true; + if (op.wants_plane) { + int ret = drmModeSetPlane(fd, op.plane_id, op.crtc_id, + uint32_t(-1), 0, + 0, 0, w, h, + 0 << 16, 0 << 16, w << 16, h << 16); + if (ret == -1) + qErrnoWarning(errno, "drmModeSetPlane failed"); + } + } } } - int ret = drmModePageFlip(device()->fd(), - output().crtc_id, + int ret = drmModePageFlip(fd, + op.crtc_id, fb->fb, DRM_MODE_PAGE_FLIP_EVENT, this); diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index b443a724ec..cf1de71831 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -39,11 +39,11 @@ ****************************************************************************/ #include "qeglfskmsegldeviceintegration.h" +#include "qeglfskmsegldevice.h" +#include "qeglfskmsegldevicescreen.h" #include #include "private/qeglfswindow_p.h" #include "private/qeglfscursor_p.h" -#include "qeglfskmsegldevice.h" -#include "qeglfskmsscreen.h" #include #include @@ -171,20 +171,23 @@ void QEglJetsonTK1Window::resetSurface() return; } - QEglFSKmsScreen *cur_screen = static_cast(screen()); + QEglFSKmsEglDeviceScreen *cur_screen = static_cast(screen()); Q_ASSERT(cur_screen); - qCDebug(qLcEglfsKmsDebug, "Searching for id: %d", cur_screen->output().crtc_id); + QEglFSKmsOutput &output(cur_screen->output()); + const uint32_t wantedId = !output.wants_plane ? output.crtc_id : output.plane_id; + qCDebug(qLcEglfsKmsDebug, "Searching for id: %d", wantedId); EGLOutputLayerEXT layer = EGL_NO_OUTPUT_LAYER_EXT; for (int i = 0; i < actualCount; ++i) { EGLAttrib id; if (m_integration->m_funcs->query_output_layer_attrib(display, layers[i], EGL_DRM_CRTC_EXT, &id)) { qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - crtc %d", i, layers[i], (int) id); - if (id == EGLAttrib(cur_screen->output().crtc_id)) + if (id == EGLAttrib(wantedId)) layer = layers[i]; } else if (m_integration->m_funcs->query_output_layer_attrib(display, layers[i], EGL_DRM_PLANE_EXT, &id)) { - // Not used yet, just for debugging. qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - plane %d", i, layers[i], (int) id); + if (id == EGLAttrib(wantedId)) + layer = layers[i]; } else { qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - unknown", i, layers[i]); } diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp index 1f672afeb4..3935c99b9e 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp @@ -67,13 +67,16 @@ QPlatformCursor *QEglFSKmsEglDeviceScreen::cursor() const void QEglFSKmsEglDeviceScreen::waitForFlip() { - if (!output().mode_set) { - output().mode_set = true; + QEglFSKmsOutput &op(output()); + const int fd = device()->fd(); + const uint32_t w = op.modes[op.mode].hdisplay; + const uint32_t h = op.modes[op.mode].vdisplay; - drmModeCrtcPtr currentMode = drmModeGetCrtc(device()->fd(), output().crtc_id); - const bool alreadySet = currentMode - && currentMode->width == output().modes[output().mode].hdisplay - && currentMode->height == output().modes[output().mode].vdisplay; + if (!op.mode_set) { + op.mode_set = true; + + drmModeCrtcPtr currentMode = drmModeGetCrtc(fd, op.crtc_id); + const bool alreadySet = currentMode && currentMode->width == w && currentMode->height == h; if (currentMode) drmModeFreeCrtc(currentMode); if (alreadySet) { @@ -87,14 +90,26 @@ void QEglFSKmsEglDeviceScreen::waitForFlip() } qCDebug(qLcEglfsKmsDebug, "Setting mode"); - int ret = drmModeSetCrtc(device()->fd(), output().crtc_id, + int ret = drmModeSetCrtc(fd, op.crtc_id, uint32_t(-1), 0, 0, - &output().connector_id, 1, - &output().modes[output().mode]); + &op.connector_id, 1, + &op.modes[op.mode]); if (ret) - qFatal("drmModeSetCrtc failed"); + qErrnoWarning(errno, "drmModeSetCrtc failed"); } + if (!op.plane_set) { + op.plane_set = true; + + if (op.wants_plane) { + qCDebug(qLcEglfsKmsDebug, "Setting plane %u", op.plane_id); + int ret = drmModeSetPlane(fd, op.plane_id, op.crtc_id, uint32_t(-1), 0, + 0, 0, w, h, + 0 << 16, 0 << 16, w << 16, h << 16); + if (ret == -1) + qErrnoWarning(errno, "drmModeSetPlane failed"); + } + } } QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp index b3c1fbb1bd..75dd083750 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp @@ -329,9 +329,32 @@ QEglFSKmsScreen *QEglFSKmsDevice::createScreenForConnector(drmModeResPtr resourc drmModeGetCrtc(m_dri_fd, crtc_id), modes, connector->subpixel, - connectorProperty(connector, QByteArrayLiteral("DPMS")) + connectorProperty(connector, QByteArrayLiteral("DPMS")), + false, + 0, + false }; + bool ok; + int idx = qEnvironmentVariableIntValue("QT_QPA_EGLFS_KMS_PLANE_INDEX", &ok); + if (ok) { + drmModePlaneRes *planeResources = drmModeGetPlaneResources(m_dri_fd); + if (planeResources) { + if (idx >= 0 && idx < int(planeResources->count_planes)) { + drmModePlane *plane = drmModeGetPlane(m_dri_fd, planeResources->planes[idx]); + if (plane) { + output.wants_plane = true; + output.plane_id = plane->plane_id; + qCDebug(qLcEglfsKmsDebug, "Forcing plane index %d, plane id %u (belongs to crtc id %u)", + idx, plane->plane_id, plane->crtc_id); + drmModeFreePlane(plane); + } + } else { + qWarning("Invalid plane index %d, must be between 0 and %u", idx, planeResources->count_planes - 1); + } + } + } + m_crtc_allocator |= (1 << output.crtc_id); m_connector_allocator |= (1 << output.connector_id); @@ -406,7 +429,7 @@ void QEglFSKmsDevice::createScreens() if (idx >= 0 && idx < resources->count_connectors) wantedConnectorIndex = idx; else - qWarning("Invalid connector index %d", idx); + qWarning("Invalid connector index %d, must be between 0 and %u", idx, resources->count_connectors - 1); } for (int i = 0; i < resources->count_connectors; i++) { diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h index 2b6a0ffe6c..fa331f0931 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h @@ -67,6 +67,9 @@ struct QEglFSKmsOutput QList modes; int subpixel; drmModePropertyPtr dpms_prop; + bool wants_plane; + uint32_t plane_id; + bool plane_set; }; class Q_EGLFS_EXPORT QEglFSKmsScreen : public QEglFSScreen -- cgit v1.2.3 From 86ccc843574eb57c6bb6d68e96c56b7cbcbb66f0 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Tue, 6 Dec 2016 23:59:40 +0300 Subject: eglfs: Add missing override Change-Id: I257cfb29b919de5d4876d39e0512815c6ed24a88 Reviewed-by: Laszlo Agocs --- .../eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp index f9924fe5ce..0a547b832f 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp @@ -55,7 +55,7 @@ public: EventReader(QEglFSX11Integration *integration) : m_integration(integration) { } - void run(); + void run() override; private: QEglFSX11Integration *m_integration; -- cgit v1.2.3 From 87fefbc08e80119dba24767bfc9b6ecc64be5fcd Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 19 Oct 2016 12:49:52 +0300 Subject: Plugins: use QStringBuilder more Change-Id: I6f026b81fdc403d99d37dfa22ea6a27a95ead347 Reviewed-by: Thiago Macieira Reviewed-by: Edward Welbourne --- .../deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp index 75dd083750..f372b9d156 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp @@ -108,14 +108,10 @@ static const char * const connector_type_names[] = { // must match DRM_MODE_CONN static QByteArray nameForConnector(const drmModeConnectorPtr connector) { - QByteArray connectorName("UNKNOWN"); - + const QByteArray id = QByteArray::number(connector->connector_type_id); if (connector->connector_type < ARRAY_LENGTH(connector_type_names)) - connectorName = connector_type_names[connector->connector_type]; - - connectorName += QByteArray::number(connector->connector_type_id); - - return connectorName; + return connector_type_names[connector->connector_type] + id; + return "UNKNOWN" + id; } static bool parseModeline(const QByteArray &text, drmModeModeInfoPtr mode) -- cgit v1.2.3