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

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

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

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

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

◆ fd()

◆ hasAtomicSupport()

bool QKmsDevice::hasAtomicSupport ( )

Definition at line 900 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 955 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 972 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 743 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 991 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 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().

+ 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: