Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qkmsdevice_p.h>
Classes | |
struct | ScreenInfo |
Public Member Functions | |
QKmsDevice (QKmsScreenConfig *screenConfig, const QString &path=QString()) | |
virtual | ~QKmsDevice () |
virtual bool | open ()=0 |
virtual void | close ()=0 |
virtual void * | nativeDisplay () const =0 |
bool | hasAtomicSupport () |
void | createScreens () |
int | fd () const |
QString | devicePath () const |
QKmsScreenConfig * | screenConfig () const |
Protected Types | |
typedef std::function< void(drmModePropertyPtr, quint64)> | PropCallback |
Protected Member Functions | |
virtual QPlatformScreen * | createScreen (const QKmsOutput &output)=0 |
virtual QPlatformScreen * | createHeadlessScreen () |
virtual void | registerScreenCloning (QPlatformScreen *screen, QPlatformScreen *screenThisScreenClones, const QList< QPlatformScreen * > &screensCloningThisScreen) |
virtual void | registerScreen (QPlatformScreen *screen, bool isPrimary, const QPoint &virtualPos, const QList< QPlatformScreen * > &virtualSiblings)=0 |
void | setFd (int fd) |
int | crtcForConnector (drmModeResPtr resources, drmModeConnectorPtr connector) |
QPlatformScreen * | createScreenForConnector (drmModeResPtr resources, drmModeConnectorPtr connector, ScreenInfo *vinfo) |
drmModePropertyPtr | connectorProperty (drmModeConnectorPtr connector, const QByteArray &name) |
drmModePropertyBlobPtr | connectorPropertyBlob (drmModeConnectorPtr connector, const QByteArray &name) |
void | enumerateProperties (drmModeObjectPropertiesPtr objProps, PropCallback callback) |
void | discoverPlanes () |
void | parseConnectorProperties (uint32_t connectorId, QKmsOutput *output) |
void | parseCrtcProperties (uint32_t crtcId, QKmsOutput *output) |
Protected Attributes | |
QKmsScreenConfig * | m_screenConfig |
QString | m_path |
int | m_dri_fd |
bool | m_has_atomic_support |
quint32 | m_crtc_allocator |
QList< QKmsPlane > | m_planes |
Definition at line 189 of file qkmsdevice_p.h.
|
protected |
Definition at line 238 of file qkmsdevice_p.h.
QKmsDevice::QKmsDevice | ( | QKmsScreenConfig * | screenConfig, |
const QString & | path = QString() ) |
Definition at line 545 of file qkmsdevice.cpp.
References QKmsScreenConfig::devicePath(), QString::isEmpty(), m_path, m_screenConfig, qCDebug, qFatal, and qPrintable.
|
virtual |
Definition at line 562 of file qkmsdevice.cpp.
|
pure virtual |
Implemented in QEglFSKmsGbmDevice, QEglFSKmsEglDevice, QEglFSKmsVsp2Device, and QLinuxFbDevice.
Referenced by QEglFSKmsIntegration::platformDestroy().
|
protected |
Definition at line 512 of file qkmsdevice.cpp.
Referenced by createScreenForConnector().
|
protected |
Definition at line 528 of file qkmsdevice.cpp.
Referenced by createScreenForConnector().
|
protectedvirtual |
Reimplemented in QEglFSKmsGbmDevice, and QEglFSKmsVsp2Device.
Definition at line 736 of file qkmsdevice.cpp.
Referenced by createScreens().
|
protectedpure virtual |
Implemented in QEglFSKmsGbmDevice, QEglFSKmsEglDevice, QEglFSKmsVsp2Device, and QLinuxFbDevice.
Referenced by createScreenForConnector().
|
protected |
Definition at line 154 of file qkmsdevice.cpp.
References assignPlane(), connectorProperty(), connectorPropertyBlob(), createScreen(), crtcForConnector(), Qt::dec(), DRM_FORMAT_ABGR8888, DRM_FORMAT_RGB565, QString::fromUtf8(), hasAtomicSupport(), Qt::hex(), i, QKmsDevice::ScreenInfo::isPrimary, m_crtc_allocator, m_dri_fd, m_planes, m_screenConfig, nameForConnector(), QString::number(), ok, QKmsDevice::ScreenInfo::output, output, OutputConfigCurrent, OutputConfigMode, OutputConfigModeline, OutputConfigOff, OutputConfigPreferred, OutputConfigSkip, QKmsScreenConfig::outputSettings(), parseConnectorProperties(), parseCrtcProperties(), parseModeline(), QKmsPlane::PrimaryPlane, Q_ASSERT, QByteArrayLiteral, qCDebug, qEnvironmentVariable(), qEnvironmentVariableIntValue(), qEnvironmentVariableIsSet(), qPrintable, QStringLiteral, qWarning, QByteArray::split(), toBool(), toInt(), QByteArray::toLower(), QMap< Key, T >::value(), QKmsDevice::ScreenInfo::virtualIndex, and QKmsDevice::ScreenInfo::virtualPos.
Referenced by createScreens().
void QKmsDevice::createScreens | ( | ) |
Definition at line 594 of file qkmsdevice.cpp.
References createHeadlessScreen(), createScreenForConnector(), discoverPlanes(), DRM_CLIENT_CAP_ATOMIC, DRM_CLIENT_CAP_UNIVERSAL_PLANES, QKmsScreenConfig::headless(), i, m_dri_fd, m_has_atomic_support, m_screenConfig, ok, orderedScreenLessThan(), pos, qCDebug, qEnvironmentVariableIntValue(), qErrnoWarning(), qWarning, registerScreen(), registerScreenCloning(), QPoint::ry(), QPlatformScreen::screen(), screen, QKmsScreenConfig::separateScreens(), QKmsScreenConfig::virtualDesktopLayout(), and QKmsScreenConfig::VirtualDesktopLayoutVertical.
Referenced by QLinuxFbDrmScreen::initialize(), and QEglFSKmsIntegration::screenInit().
|
protected |
Definition at line 33 of file qkmsdevice.cpp.
References i, j, m_crtc_allocator, m_dri_fd, and qWarning.
Referenced by createScreenForConnector().
QString QKmsDevice::devicePath | ( | ) | const |
Definition at line 889 of file qkmsdevice.cpp.
References m_path.
Referenced by QEglFSKmsGbmDevice::open(), QEglFSKmsEglDevice::open(), QEglFSKmsVsp2Device::open(), and QLinuxFbDevice::open().
|
protected |
Definition at line 798 of file qkmsdevice.cpp.
References QList< T >::append(), QString::asprintf(), QKmsPlane::availableRotations, QKmsPlane::blendOpPropertyId, QList< T >::clear(), QKmsPlane::crtcheightPropertyId, QKmsPlane::crtcPropertyId, QKmsPlane::crtcwidthPropertyId, QKmsPlane::crtcXPropertyId, QKmsPlane::crtcYPropertyId, enumerateProperties(), QKmsPlane::framebufferPropertyId, i, QKmsPlane::id, if(), m_dri_fd, m_planes, QKmsPlane::possibleCrtcs, propTypeIs(), qCDebug, qPrintable, QKmsPlane::rotationPropertyId, QKmsPlane::srcheightPropertyId, QKmsPlane::srcwidthPropertyId, QKmsPlane::srcXPropertyId, QKmsPlane::srcYPropertyId, QKmsPlane::supportedFormats, and QKmsPlane::zposPropertyId.
Referenced by createScreens().
|
protected |
Definition at line 760 of file qkmsdevice.cpp.
References DRM_MODE_PROP_OBJECT, DRM_MODE_PROP_SIGNED_RANGE, i, m_dri_fd, propTypeIs(), and qCDebug.
Referenced by discoverPlanes(), parseConnectorProperties(), and parseCrtcProperties().
int QKmsDevice::fd | ( | ) | const |
Definition at line 884 of file qkmsdevice.cpp.
References m_dri_fd.
Referenced by QEglFSKmsEglDeviceScreen::~QEglFSKmsEglDeviceScreen(), QEglFSKmsVsp2Screen::blendAndFlipDrm(), QEglFSKmsGbmDevice::close(), QEglFSKmsEglDevice::close(), QEglFSKmsVsp2Device::close(), QLinuxFbDevice::close(), QEglFSKmsEventReader::create(), QEglFSKmsEglDeviceIntegration::createDisplay(), QEglFSKmsGbmScreen::ensureModeSet(), QEglFSKmsGbmScreen::flip(), QEglFSKmsIntegration::nativeResourceForIntegration(), QEglFSKmsGbmDevice::open(), QEglFSKmsEglDevice::open(), QEglFSKmsVsp2Device::open(), setFd(), QLinuxFbDevice::setMode(), QLinuxFbDevice::swapBuffers(), and QEglFSKmsEglDeviceScreen::waitForFlip().
bool QKmsDevice::hasAtomicSupport | ( | ) |
Definition at line 900 of file qkmsdevice.cpp.
References m_has_atomic_support.
Referenced by createScreenForConnector().
|
pure virtual |
Implemented in QEglFSKmsGbmDevice, QEglFSKmsEglDevice, QEglFSKmsVsp2Device, and QLinuxFbDevice.
Referenced by QEglFSKmsIntegration::platformDisplay().
|
pure virtual |
Implemented in QEglFSKmsGbmDevice, QEglFSKmsEglDevice, QEglFSKmsVsp2Device, and QLinuxFbDevice.
Referenced by QEglFSKmsIntegration::platformInit().
|
protected |
Definition at line 955 of file qkmsdevice.cpp.
References enumerateProperties(), m_dri_fd, output, Q_UNUSED, and qCDebug.
Referenced by createScreenForConnector().
|
protected |
Definition at line 972 of file qkmsdevice.cpp.
References enumerateProperties(), m_dri_fd, output, Q_UNUSED, and qCDebug.
Referenced by createScreenForConnector().
|
protectedpure virtual |
Implemented in QEglFSKmsGbmDevice, QEglFSKmsDevice, and QLinuxFbDevice.
Referenced by createScreens().
|
protectedvirtual |
Reimplemented in QEglFSKmsGbmDevice, and QEglFSKmsVsp2Device.
Definition at line 743 of file qkmsdevice.cpp.
References Q_UNUSED, and screen.
Referenced by createScreens().
QKmsScreenConfig * QKmsDevice::screenConfig | ( | ) | const |
Definition at line 991 of file qkmsdevice.cpp.
References m_screenConfig.
Referenced by QEglFSKmsGbmDevice::createGlobalCursor(), QEglFSKmsEglDevice::createScreen(), QEglFSKmsGbmScreen::cursor(), QEglFSKmsEglDeviceScreen::cursor(), QEglFSKmsScreen::rawGeometry(), and QEglFSKmsGbmDevice::registerScreen().
|
protected |
Definition at line 894 of file qkmsdevice.cpp.
References fd(), and m_dri_fd.
Referenced by QEglFSKmsGbmDevice::close(), QEglFSKmsEglDevice::close(), QEglFSKmsVsp2Device::close(), QLinuxFbDevice::close(), QEglFSKmsGbmDevice::open(), QEglFSKmsEglDevice::open(), QEglFSKmsVsp2Device::open(), and QLinuxFbDevice::open().
|
protected |
Definition at line 257 of file qkmsdevice_p.h.
Referenced by createScreenForConnector(), and crtcForConnector().
|
protected |
Definition at line 246 of file qkmsdevice_p.h.
Referenced by connectorProperty(), connectorPropertyBlob(), createScreenForConnector(), createScreens(), crtcForConnector(), discoverPlanes(), enumerateProperties(), fd(), parseConnectorProperties(), parseCrtcProperties(), and setFd().
|
protected |
Definition at line 248 of file qkmsdevice_p.h.
Referenced by createScreens(), and hasAtomicSupport().
|
protected |
Definition at line 245 of file qkmsdevice_p.h.
Referenced by QKmsDevice(), and devicePath().
Definition at line 259 of file qkmsdevice_p.h.
Referenced by createScreenForConnector(), and discoverPlanes().
|
protected |
Definition at line 244 of file qkmsdevice_p.h.
Referenced by QKmsDevice(), createScreenForConnector(), createScreens(), and screenConfig().