backends/drm: fix vblank calculation
Due to some misinterpretation of mode timings, the old method calculated vsync, not vblank, so the resulting duration was much shorter, which caused frame drops on some systems. BUG: 482064
This commit is contained in:
parent
9e77e5038f
commit
da80dd4c84
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ std::shared_ptr<DrmBlob> DrmConnectorMode::blob()
|
|||
|
||||
std::chrono::nanoseconds DrmConnectorMode::vblankTime() const
|
||||
{
|
||||
return std::chrono::nanoseconds(((m_nativeMode.vsync_end - m_nativeMode.vsync_start) * m_nativeMode.htotal * 1'000'000ULL) / m_nativeMode.clock);
|
||||
return std::chrono::nanoseconds(((m_nativeMode.vtotal - m_nativeMode.vdisplay) * m_nativeMode.htotal * 1'000'000ULL) / m_nativeMode.clock);
|
||||
}
|
||||
|
||||
drmModeModeInfo *DrmConnectorMode::nativeMode()
|
||||
|
|
Loading…
Reference in a new issue