backends/drm: fix common mode generation
The unit for refresh rate was wrong, which caused insanely high as well as negative refresh rates BUG: 455477
This commit is contained in:
parent
a6d72d3f60
commit
0c453739b1
2 changed files with 3 additions and 3 deletions
|
@ -434,13 +434,13 @@ QList<std::shared_ptr<DrmConnectorMode>> DrmConnector::generateCommonModes()
|
|||
return mode->size() == size;
|
||||
});
|
||||
if (it == m_driverModes.constEnd() && size.width() <= maxSize.width() && size.height() <= maxSize.height() && bandwidthEstimation < maxBandwidthEstimation) {
|
||||
ret << generateMode(size, 60000);
|
||||
ret << generateMode(size, 60);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::shared_ptr<DrmConnectorMode> DrmConnector::generateMode(const QSize &size, uint32_t refreshRate)
|
||||
std::shared_ptr<DrmConnectorMode> DrmConnector::generateMode(const QSize &size, float refreshRate)
|
||||
{
|
||||
auto modeInfo = libxcvt_gen_mode_info(size.width(), size.height(), refreshRate, false, false);
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ public:
|
|||
|
||||
private:
|
||||
QList<std::shared_ptr<DrmConnectorMode>> generateCommonModes();
|
||||
std::shared_ptr<DrmConnectorMode> generateMode(const QSize &size, uint32_t refreshRate);
|
||||
std::shared_ptr<DrmConnectorMode> generateMode(const QSize &size, float refreshRate);
|
||||
|
||||
std::unique_ptr<DrmPipeline> m_pipeline;
|
||||
DrmUniquePtr<drmModeConnector> m_conn;
|
||||
|
|
Loading…
Reference in a new issue