[mutter] kms/mode: Add getter for name
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms/mode: Add getter for name
- Date: Fri, 22 Jan 2021 17:08:26 +0000 (UTC)
commit 0fa0eeef57a7908690cc2a4b6f6c2ed5678959ca
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Jul 2 11:51:32 2020 +0200
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>
src/backends/native/meta-kms-mode.c | 6 ++++++
src/backends/native/meta-kms-mode.h | 2 ++
2 files changed, 8 insertions(+)
---
diff --git a/src/backends/native/meta-kms-mode.c b/src/backends/native/meta-kms-mode.c
index c767eb88f7..8b61e1f60b 100644
--- a/src/backends/native/meta-kms-mode.c
+++ b/src/backends/native/meta-kms-mode.c
@@ -55,6 +55,12 @@ meta_kms_mode_ensure_blob_id (MetaKmsMode *mode,
return mode->blob_id;
}
+const char *
+meta_kms_mode_get_name (MetaKmsMode *mode)
+{
+ return mode->drm_mode.name;
+}
+
MetaKmsModeFlag
meta_kms_mode_get_flags (MetaKmsMode *mode)
{
diff --git a/src/backends/native/meta-kms-mode.h b/src/backends/native/meta-kms-mode.h
index 1e3e83a2f1..cbdf246519 100644
--- a/src/backends/native/meta-kms-mode.h
+++ b/src/backends/native/meta-kms-mode.h
@@ -31,6 +31,8 @@ typedef enum _MetaKmsModeFlag
META_KMS_MODE_FLAG_NONE = 0,
} MetaKmsModeFlag;
+const char * meta_kms_mode_get_name (MetaKmsMode *mode);
+
MetaKmsModeFlag meta_kms_mode_get_flags (MetaKmsMode *mode);
const drmModeModeInfo * meta_kms_mode_get_drm_mode (MetaKmsMode *mode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]