platforms/drm: reload m_conn in DrmConnector::updateProperties
This commit is contained in:
parent
82dd480196
commit
1af2067f40
3 changed files with 13 additions and 3 deletions
|
@ -179,6 +179,7 @@ bool DrmGpu::updateOutputs()
|
|||
}
|
||||
m_connectors << c;
|
||||
} else {
|
||||
(*it)->updateProperties();
|
||||
oldConnectors.removeOne(*it);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,9 +138,8 @@ bool DrmConnector::init()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool DrmConnector::isConnected()
|
||||
bool DrmConnector::isConnected() const
|
||||
{
|
||||
m_conn.reset(drmModeGetConnector(gpu()->fd(), id()));
|
||||
if (!m_conn) {
|
||||
return false;
|
||||
}
|
||||
|
@ -335,4 +334,13 @@ AbstractWaylandOutput::RgbRange DrmConnector::rgbRange() const
|
|||
return rgb->enumForValue<AbstractWaylandOutput::RgbRange>(rgb->pending());
|
||||
}
|
||||
|
||||
bool DrmConnector::updateProperties()
|
||||
{
|
||||
if (!DrmObject::updateProperties()) {
|
||||
return false;
|
||||
}
|
||||
m_conn.reset(drmModeGetConnector(gpu()->fd(), id()));
|
||||
return m_conn != nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
return m_encoders;
|
||||
}
|
||||
|
||||
bool isConnected();
|
||||
bool isConnected() const;
|
||||
|
||||
bool isNonDesktop() const {
|
||||
auto prop = m_props.at(static_cast<uint32_t>(PropertyIndex::NonDesktop));
|
||||
|
@ -103,6 +103,7 @@ public:
|
|||
AbstractWaylandOutput::RgbRange rgbRange() const;
|
||||
|
||||
bool needsModeset() const override;
|
||||
bool updateProperties() override;
|
||||
|
||||
private:
|
||||
DrmScopedPointer<drmModeConnector> m_conn;
|
||||
|
|
Loading…
Reference in a new issue