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>
This commit is contained in:
parent
e40ff9d8b7
commit
2d939754b1
@ -54,6 +54,7 @@ typedef struct _MetaCrtcModeInfo
|
|||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
float refresh_rate;
|
float refresh_rate;
|
||||||
|
int64_t vblank_duration_us;
|
||||||
MetaCrtcModeFlag flags;
|
MetaCrtcModeFlag flags;
|
||||||
} MetaCrtcModeInfo;
|
} MetaCrtcModeInfo;
|
||||||
|
|
||||||
|
@ -55,6 +55,8 @@ meta_crtc_mode_kms_new (MetaKmsMode *kms_mode,
|
|||||||
crtc_mode_info->flags = drm_mode->flags;
|
crtc_mode_info->flags = drm_mode->flags;
|
||||||
crtc_mode_info->refresh_rate =
|
crtc_mode_info->refresh_rate =
|
||||||
meta_calculate_drm_mode_refresh_rate (drm_mode);
|
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);
|
crtc_mode_name = g_strndup (drm_mode->name, DRM_DISPLAY_MODE_LEN);
|
||||||
mode_kms = g_object_new (META_TYPE_CRTC_MODE_KMS,
|
mode_kms = g_object_new (META_TYPE_CRTC_MODE_KMS,
|
||||||
|
Loading…
Reference in New Issue
Block a user