Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QKmsDevice Class Referenceabstract

#include <qkmsdevice_p.h>

+ Inheritance diagram for QKmsDevice:
+ Collaboration diagram for QKmsDevice:

Classes

struct  ScreenInfo
 

Public Member Functions

 QKmsDevice (QKmsScreenConfig *screenConfig, const QString &path=QString())
 
virtual ~QKmsDevice ()
 
virtual bool open ()=0
 
virtual void close ()=0
 
virtual voidnativeDisplay () const =0
 
bool hasAtomicSupport ()
 
void createScreens ()
 
int fd () const
 
QString devicePath () const
 
QKmsScreenConfigscreenConfig () const
 

Protected Types

typedef std::function< void(drmModePropertyPtr, quint64)> PropCallback
 

Protected Member Functions

virtual QPlatformScreencreateScreen (const QKmsOutput &output)=0
 
virtual QPlatformScreencreateHeadlessScreen ()
 
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)
 
QPlatformScreencreateScreenForConnector (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

QKmsScreenConfigm_screenConfig
 
QString m_path
 
int m_dri_fd
 
bool m_has_atomic_support
 
quint32 m_crtc_allocator
 
QList< QKmsPlanem_planes
 

Detailed Description

Definition at line 189 of file qkmsdevice_p.h.

Member Typedef Documentation

◆ PropCallback

typedef std::function<void(drmModePropertyPtr, quint64)> QKmsDevice::PropCallback
protected

Definition at line 238 of file qkmsdevice_p.h.

Constructor & Destructor Documentation

◆ QKmsDevice()

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.

+ Here is the call graph for this function:

◆ ~QKmsDevice()

QKmsDevice::~QKmsDevice ( )
virtual

Definition at line 562 of file qkmsdevice.cpp.

Member Function Documentation

◆ close()

virtual void QKmsDevice::close ( )
pure virtual

Implemented in QEglFSKmsGbmDevice, QEglFSKmsEglDevice, QEglFSKmsVsp2Device, and QLinuxFbDevice.

Referenced by QEglFSKmsIntegration::platformDestroy().

+ Here is the caller graph for this function:

◆ connectorProperty()

drmModePropertyPtr QKmsDevice::connectorProperty ( drmModeConnectorPtr  connector,
const QByteArray name 
)
protected

Definition at line 512 of file qkmsdevice.cpp.

References i, and m_dri_fd.

Referenced by createScreenForConnector().

+ Here is the caller graph for this function:

◆ connectorPropertyBlob()

drmModePropertyBlobPtr QKmsDevice::connectorPropertyBlob ( drmModeConnectorPtr  connector,
const QByteArray name 
)
protected

Definition at line 528 of file qkmsdevice.cpp.

References i, and m_dri_fd.

Referenced by createScreenForConnector().

+ Here is the caller graph for this function:

◆ createHeadlessScreen()

QPlatformScreen * QKmsDevice::createHeadlessScreen ( )
protectedvirtual

Reimplemented in QEglFSKmsGbmDevice, and QEglFSKmsVsp2Device.

Definition at line 735 of file qkmsdevice.cpp.

Referenced by createScreens().

+ Here is the caller graph for this function:

◆ createScreen()

virtual QPlatformScreen * QKmsDevice::createScreen ( const QKmsOutput output)
protectedpure virtual

Implemented in QEglFSKmsGbmDevice, QEglFSKmsEglDevice, QEglFSKmsVsp2Device, and QLinuxFbDevice.

Referenced by createScreenForConnector().

+ Here is the caller graph for this function:

◆ createScreenForConnector()

QPlatformScreen * QKmsDevice::createScreenForConnector ( drmModeResPtr  resources,
drmModeConnectorPtr  connector,
ScreenInfo vinfo 
)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createScreens()

void QKmsDevice::createScreens ( )

◆ crtcForConnector()

int QKmsDevice::crtcForConnector ( drmModeResPtr  resources,
drmModeConnectorPtr  connector 
)
protected

Definition at line 33 of file qkmsdevice.cpp.

References i, j, m_crtc_allocator, m_dri_fd, and qWarning.

Referenced by createScreenForConnector().

+ Here is the caller graph for this function:

◆ devicePath()

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().

+ Here is the caller graph for this function:

◆ discoverPlanes()

void QKmsDevice::discoverPlanes ( )
protected

◆ enumerateProperties()

void QKmsDevice::enumerateProperties ( drmModeObjectPropertiesPtr  objProps,
PropCallback  callback 
)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fd()

◆ hasAtomicSupport()

bool QKmsDevice::hasAtomicSupport ( )

Definition at line 899 of file qkmsdevice.cpp.

References m_has_atomic_support.

Referenced by createScreenForConnector().

+ Here is the caller graph for this function:

◆ nativeDisplay()

virtual void * QKmsDevice::nativeDisplay ( ) const
pure virtual

Implemented in QEglFSKmsGbmDevice, QEglFSKmsEglDevice, QEglFSKmsVsp2Device, and QLinuxFbDevice.

Referenced by QEglFSKmsIntegration::platformDisplay().

+ Here is the caller graph for this function:

◆ open()

virtual bool QKmsDevice::open ( )
pure virtual

Implemented in QEglFSKmsGbmDevice, QEglFSKmsEglDevice, QEglFSKmsVsp2Device, and QLinuxFbDevice.

Referenced by QEglFSKmsIntegration::platformInit().

+ Here is the caller graph for this function:

◆ parseConnectorProperties()

void QKmsDevice::parseConnectorProperties ( uint32_t  connectorId,
QKmsOutput output 
)
protected

Definition at line 954 of file qkmsdevice.cpp.

References enumerateProperties(), m_dri_fd, output, Q_UNUSED, and qCDebug.

Referenced by createScreenForConnector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseCrtcProperties()

void QKmsDevice::parseCrtcProperties ( uint32_t  crtcId,
QKmsOutput output 
)
protected

Definition at line 971 of file qkmsdevice.cpp.

References enumerateProperties(), m_dri_fd, output, Q_UNUSED, and qCDebug.

Referenced by createScreenForConnector().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ registerScreen()

virtual void QKmsDevice::registerScreen ( QPlatformScreen screen,
bool  isPrimary,
const QPoint virtualPos,
const QList< QPlatformScreen * > &  virtualSiblings 
)
protectedpure virtual

Implemented in QEglFSKmsGbmDevice, QEglFSKmsDevice, and QLinuxFbDevice.

Referenced by createScreens().

+ Here is the caller graph for this function:

◆ registerScreenCloning()

void QKmsDevice::registerScreenCloning ( QPlatformScreen screen,
QPlatformScreen screenThisScreenClones,
const QList< QPlatformScreen * > &  screensCloningThisScreen 
)
protectedvirtual

Reimplemented in QEglFSKmsGbmDevice, and QEglFSKmsVsp2Device.

Definition at line 742 of file qkmsdevice.cpp.

References Q_UNUSED, and screen.

Referenced by createScreens().

+ Here is the caller graph for this function:

◆ screenConfig()

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().

+ Here is the caller graph for this function:

◆ setFd()

void QKmsDevice::setFd ( int  fd)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_crtc_allocator

quint32 QKmsDevice::m_crtc_allocator
protected

Definition at line 257 of file qkmsdevice_p.h.

Referenced by createScreenForConnector(), and crtcForConnector().

◆ m_dri_fd

◆ m_has_atomic_support

bool QKmsDevice::m_has_atomic_support
protected

Definition at line 248 of file qkmsdevice_p.h.

Referenced by createScreens(), and hasAtomicSupport().

◆ m_path

QString QKmsDevice::m_path
protected

Definition at line 245 of file qkmsdevice_p.h.

Referenced by QKmsDevice(), and devicePath().

◆ m_planes

QList<QKmsPlane> QKmsDevice::m_planes
protected

Definition at line 259 of file qkmsdevice_p.h.

Referenced by createScreenForConnector(), and discoverPlanes().

◆ m_screenConfig

QKmsScreenConfig* QKmsDevice::m_screenConfig
protected

Definition at line 244 of file qkmsdevice_p.h.

Referenced by QKmsDevice(), createScreenForConnector(), createScreens(), and screenConfig().


The documentation for this class was generated from the following files: