kms/mode: Add getter for name

Gets the name directly from the DRM mode.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1488>
This commit is contained in:
Jonas Ådahl 2020-07-02 11:51:32 +02:00 committed by Marge Bot
parent 2c4a3c5959
commit 0fa0eeef57
2 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,12 @@ meta_kms_mode_ensure_blob_id (MetaKmsMode *mode,
return mode->blob_id; return mode->blob_id;
} }
const char *
meta_kms_mode_get_name (MetaKmsMode *mode)
{
return mode->drm_mode.name;
}
MetaKmsModeFlag MetaKmsModeFlag
meta_kms_mode_get_flags (MetaKmsMode *mode) meta_kms_mode_get_flags (MetaKmsMode *mode)
{ {

View File

@ -31,6 +31,8 @@ typedef enum _MetaKmsModeFlag
META_KMS_MODE_FLAG_NONE = 0, META_KMS_MODE_FLAG_NONE = 0,
} MetaKmsModeFlag; } MetaKmsModeFlag;
const char * meta_kms_mode_get_name (MetaKmsMode *mode);
MetaKmsModeFlag meta_kms_mode_get_flags (MetaKmsMode *mode); MetaKmsModeFlag meta_kms_mode_get_flags (MetaKmsMode *mode);
const drmModeModeInfo * meta_kms_mode_get_drm_mode (MetaKmsMode *mode); const drmModeModeInfo * meta_kms_mode_get_drm_mode (MetaKmsMode *mode);