Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_backend.h
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
50 | namespace KWin | 50 | namespace KWin | ||
51 | { | 51 | { | ||
52 | 52 | | |||
53 | class Udev; | 53 | class Udev; | ||
54 | class UdevMonitor; | 54 | class UdevMonitor; | ||
55 | 55 | | |||
56 | class DrmOutput; | 56 | class DrmOutput; | ||
57 | class DrmPlane; | 57 | class DrmPlane; | ||
58 | class DrmCrtc; | ||||
59 | class DrmConnector; | ||||
58 | 60 | | |||
59 | 61 | | |||
60 | class KWIN_EXPORT DrmBackend : public Platform | 62 | class KWIN_EXPORT DrmBackend : public Platform | ||
61 | { | 63 | { | ||
62 | Q_OBJECT | 64 | Q_OBJECT | ||
63 | Q_INTERFACES(KWin::Platform) | 65 | Q_INTERFACES(KWin::Platform) | ||
64 | Q_PLUGIN_METADATA(IID "org.kde.kwin.Platform" FILE "drm.json") | 66 | Q_PLUGIN_METADATA(IID "org.kde.kwin.Platform" FILE "drm.json") | ||
65 | public: | 67 | public: | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 122 | private: | |||
123 | void activate(bool active); | 125 | void activate(bool active); | ||
124 | void reactivate(); | 126 | void reactivate(); | ||
125 | void deactivate(); | 127 | void deactivate(); | ||
126 | void queryResources(); | 128 | void queryResources(); | ||
127 | void setCursor(); | 129 | void setCursor(); | ||
128 | void updateCursor(); | 130 | void updateCursor(); | ||
129 | void moveCursor(); | 131 | void moveCursor(); | ||
130 | void initCursor(); | 132 | void initCursor(); | ||
131 | quint32 findCrtc(drmModeRes *res, drmModeConnector *connector, bool *ok = nullptr); | | |||
132 | bool crtcIsUsed(quint32 crtc); | | |||
133 | void outputDpmsChanged(); | 133 | void outputDpmsChanged(); | ||
134 | void readOutputsConfiguration(); | 134 | void readOutputsConfiguration(); | ||
135 | QByteArray generateOutputConfigurationUuid() const; | 135 | QByteArray generateOutputConfigurationUuid() const; | ||
136 | DrmOutput *findOutput(quint32 connector); | 136 | DrmOutput *findOutput(quint32 connector); | ||
137 | DrmOutput *findOutput(const QByteArray &uuid); | 137 | DrmOutput *findOutput(const QByteArray &uuid); | ||
138 | QScopedPointer<Udev> m_udev; | 138 | QScopedPointer<Udev> m_udev; | ||
139 | QScopedPointer<UdevMonitor> m_udevMonitor; | 139 | QScopedPointer<UdevMonitor> m_udevMonitor; | ||
140 | int m_fd = -1; | 140 | int m_fd = -1; | ||
141 | int m_drmId = 0; | 141 | int m_drmId = 0; | ||
142 | // all crtcs | ||||
143 | QVector<DrmCrtc*> m_crtcs; | ||||
144 | // all connectors | ||||
145 | QVector<DrmConnector*> m_connectors; | ||||
146 | // currently active output pipelines (planes + crtc + encoder + connector) | ||||
142 | QVector<DrmOutput*> m_outputs; | 147 | QVector<DrmOutput*> m_outputs; | ||
143 | DrmBuffer *m_cursor[2]; | 148 | DrmBuffer *m_cursor[2]; | ||
144 | bool m_atomicModeSetting = false; | 149 | bool m_atomicModeSetting = false; | ||
145 | bool m_cursorEnabled = false; | 150 | bool m_cursorEnabled = false; | ||
146 | int m_cursorIndex = 0; | 151 | int m_cursorIndex = 0; | ||
147 | int m_pageFlipsPending = 0; | 152 | int m_pageFlipsPending = 0; | ||
148 | bool m_active = false; | 153 | bool m_active = false; | ||
149 | QVector<DrmBuffer*> m_buffers; | 154 | QVector<DrmBuffer*> m_buffers; | ||
Show All 12 Lines |