Commit d4d4a054 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

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
(cherry picked from commit 0c453739)
parent a500eac1
Pipeline #197256 passed with stage
in 14 minutes and 17 seconds
......@@ -434,13 +434,13 @@ QList<QSharedPointer<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;
}
QSharedPointer<DrmConnectorMode> DrmConnector::generateMode(const QSize &size, uint32_t refreshRate)
QSharedPointer<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<QSharedPointer<DrmConnectorMode>> generateCommonModes();
QSharedPointer<DrmConnectorMode> generateMode(const QSize &size, uint32_t refreshRate);
QSharedPointer<DrmConnectorMode> generateMode(const QSize &size, float refreshRate);
QScopedPointer<DrmPipeline> m_pipeline;
DrmScopedPointer<drmModeConnector> m_conn;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment