backends/native: Add meta_calculate_drm_mode_vblank_duration_us()

Computes the vblank duration from mode timings.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762>
This commit is contained in:
Ivan Molodetskikh
2021-01-06 11:36:04 +03:00
committed by Marge Bot
parent 63b9ac2724
commit e40ff9d8b7
3 changed files with 129 additions and 4 deletions

View File

@ -34,6 +34,9 @@ typedef struct _MetaDrmFormatBuf
META_EXPORT_TEST
float meta_calculate_drm_mode_refresh_rate (const drmModeModeInfo *drm_mode);
META_EXPORT_TEST
int64_t meta_calculate_drm_mode_vblank_duration_us (const drmModeModeInfo *drm_mode);
const char * meta_drm_format_to_string (MetaDrmFormatBuf *tmp,
uint32_t drm_format);