Commit 0c453739 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
parent a6d72d3f
Pipeline #197225 passed with stage
in 11 minutes and 53 seconds
......@@ -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;
......
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