DRM Backend: Add some log trace for DrmConnector
CCBUG: 442980
This commit is contained in:
parent
6851996eb2
commit
6d518e8ffe
3 changed files with 31 additions and 1 deletions
|
@ -581,6 +581,7 @@ void DrmGpu::dispatchEvents()
|
|||
|
||||
void DrmGpu::removeOutput(DrmOutput *output)
|
||||
{
|
||||
qCDebug(KWIN_DRM) << "Removing output" << output;
|
||||
m_drmOutputs.removeOne(output);
|
||||
m_outputs.removeOne(output);
|
||||
Q_EMIT outputRemoved(output);
|
||||
|
@ -700,6 +701,7 @@ void DrmGpu::handleLeaseRevoked(KWaylandServer::DrmLeaseV1Interface *lease)
|
|||
|
||||
void DrmGpu::removeLeaseOutput(DrmLeaseOutput *output)
|
||||
{
|
||||
qCDebug(KWIN_DRM) << "Removing leased output" << output;
|
||||
m_leaseOutputs.removeOne(output);
|
||||
auto pipeline = output->pipeline();
|
||||
delete output;
|
||||
|
|
|
@ -105,7 +105,7 @@ bool DrmConnector::init()
|
|||
if (blob && blob->data) {
|
||||
m_edid = Edid(blob->data, blob->length);
|
||||
if (!m_edid.isValid()) {
|
||||
qCWarning(KWIN_DRM, "Couldn't parse EDID for connector with id %d", id());
|
||||
qCWarning(KWIN_DRM) << "Couldn't parse EDID for connector" << this;
|
||||
}
|
||||
}
|
||||
deleteProp(PropertyIndex::Edid);
|
||||
|
@ -363,4 +363,28 @@ const Edid *DrmConnector::edid() const
|
|||
return &m_edid;
|
||||
}
|
||||
|
||||
QDebug& operator<<(QDebug& s, const KWin::DrmConnector *obj)
|
||||
{
|
||||
QDebugStateSaver saver(s);
|
||||
if (obj) {
|
||||
|
||||
QString connState = QStringLiteral("Disconnected");
|
||||
if (!obj->m_conn || obj->m_conn->connection == DRM_MODE_UNKNOWNCONNECTION) {
|
||||
connState = QStringLiteral("Unknown Connection");
|
||||
} else if (obj->m_conn->connection == DRM_MODE_CONNECTED) {
|
||||
connState = QStringLiteral("Connected");
|
||||
}
|
||||
|
||||
s.nospace() << "DrmConnector(id=" << obj->id() <<
|
||||
", gpu="<< obj->gpu() <<
|
||||
", name="<< obj->modelName() <<
|
||||
", connection=" << connState <<
|
||||
", countMode=" << (obj->m_conn ? obj->m_conn->count_modes : 0)
|
||||
<< ')';
|
||||
} else {
|
||||
s << "DrmConnector(0x0)";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -89,6 +89,10 @@ private:
|
|||
QSize m_physicalSize = QSize(-1, -1);
|
||||
QVector<Mode> m_modes;
|
||||
int m_modeIndex = 0;
|
||||
|
||||
friend QDebug& operator<<(QDebug& s, const KWin::DrmConnector *obj);
|
||||
};
|
||||
|
||||
QDebug& operator<<(QDebug& s, const KWin::DrmConnector *obj);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue