![]() |
Qt 6.x
The Qt SDK
|
#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 735 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 QString::append(), assignPlane(), QList< T >::at(), connectorProperty(), connectorPropertyBlob(), QByteArray::constData(), QMap< Key, T >::contains(), createScreen(), crtcForConnector(), Qt::dec(), DRM_FORMAT_ABGR8888, DRM_FORMAT_RGB565, QString::fromUtf8(), hasAtomicSupport(), QSize::height(), Qt::hex(), i, QString::isEmpty(), QByteArray::isEmpty(), QSizeF::isEmpty(), 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, QList< T >::reserve(), QSize::rheight(), QSize::rwidth(), QSize::setHeight(), QSizeF::setHeight(), QSize::setWidth(), QSizeF::setWidth(), QList< T >::size(), QByteArray::split(), toBool(), QVariant::toByteArray(), QVariant::toInt(), toInt(), QByteArray::toLower(), QVariant::toString(), QMap< Key, T >::value(), QKmsDevice::ScreenInfo::virtualIndex, QKmsDevice::ScreenInfo::virtualPos, and QSize::width().
Referenced by createScreens().
void QKmsDevice::createScreens | ( | ) |
Definition at line 594 of file qkmsdevice.cpp.
References QList< T >::append(), QList< T >::begin(), createHeadlessScreen(), createScreenForConnector(), discoverPlanes(), DRM_CLIENT_CAP_ATOMIC, DRM_CLIENT_CAP_UNIVERSAL_PLANES, QList< T >::end(), QKmsScreenConfig::headless(), i, QList< T >::isEmpty(), m_dri_fd, m_has_atomic_support, m_screenConfig, ok, orderedScreenLessThan(), pos, qCDebug, qEnvironmentVariableIntValue(), qErrnoWarning(), qWarning, registerScreen(), registerScreenCloning(), QPlatformScreen::screen(), screen, QKmsScreenConfig::separateScreens(), QList< T >::size(), 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 888 of file qkmsdevice.cpp.
References m_path.
Referenced by QEglFSKmsGbmDevice::open(), QEglFSKmsEglDevice::open(), QEglFSKmsVsp2Device::open(), and QLinuxFbDevice::open().
|
protected |
Definition at line 797 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 759 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 883 of file qkmsdevice.cpp.
References m_dri_fd.
Referenced by QEglFSKmsGbmCursor::~QEglFSKmsGbmCursor(), QEglFSKmsVsp2Screen::blendAndFlipDrm(), QEglFSKmsGbmCursor::changeCursor(), QEglFSKmsGbmDevice::close(), QEglFSKmsEglDevice::close(), QEglFSKmsVsp2Device::close(), QLinuxFbDevice::close(), QEglFSKmsEventReader::create(), QEglFSKmsGbmScreen::ensureModeSet(), QEglFSKmsGbmScreen::flip(), QEglFSKmsIntegration::nativeResourceForIntegration(), QEglFSKmsGbmDevice::open(), QEglFSKmsEglDevice::open(), QEglFSKmsVsp2Device::open(), setFd(), QLinuxFbDevice::setMode(), QEglFSKmsGbmCursor::setPos(), QLinuxFbDevice::swapBuffers(), and QEglFSKmsEglDeviceScreen::waitForFlip().
bool QKmsDevice::hasAtomicSupport | ( | ) |
Definition at line 899 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 954 of file qkmsdevice.cpp.
References enumerateProperties(), m_dri_fd, output, Q_UNUSED, and qCDebug.
Referenced by createScreenForConnector().
|
protected |
Definition at line 971 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 742 of file qkmsdevice.cpp.
References Q_UNUSED, and screen.
Referenced by createScreens().
QKmsScreenConfig * QKmsDevice::screenConfig | ( | ) | const |
Definition at line 990 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 893 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().