[mutter] crtc-mode-info: Add vblank duration field



commit 2d939754b1e7230da6afbac642e11cfd0c098dbf
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Wed Jan 6 11:37:35 2021 +0300

    crtc-mode-info: Add vblank duration field
    
    Only populated for KMS backed modes, as that's where it's relevant.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762>

 src/backends/meta-crtc-mode.h            | 1 +
 src/backends/native/meta-crtc-mode-kms.c | 2 ++
 2 files changed, 3 insertions(+)
---
diff --git a/src/backends/meta-crtc-mode.h b/src/backends/meta-crtc-mode.h
index 87778b8662..2ac90e4089 100644
--- a/src/backends/meta-crtc-mode.h
+++ b/src/backends/meta-crtc-mode.h
@@ -54,6 +54,7 @@ typedef struct _MetaCrtcModeInfo
   int width;
   int height;
   float refresh_rate;
+  int64_t vblank_duration_us;
   MetaCrtcModeFlag flags;
 } MetaCrtcModeInfo;
 
diff --git a/src/backends/native/meta-crtc-mode-kms.c b/src/backends/native/meta-crtc-mode-kms.c
index 6f190edc4a..053367cfd1 100644
--- a/src/backends/native/meta-crtc-mode-kms.c
+++ b/src/backends/native/meta-crtc-mode-kms.c
@@ -55,6 +55,8 @@ meta_crtc_mode_kms_new (MetaKmsMode *kms_mode,
   crtc_mode_info->flags = drm_mode->flags;
   crtc_mode_info->refresh_rate =
     meta_calculate_drm_mode_refresh_rate (drm_mode);
+  crtc_mode_info->vblank_duration_us =
+    meta_calculate_drm_mode_vblank_duration_us (drm_mode);
 
   crtc_mode_name = g_strndup (drm_mode->name, DRM_DISPLAY_MODE_LEN);
   mode_kms = g_object_new (META_TYPE_CRTC_MODE_KMS,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]