[mutter] kms/impl-device: Add addfb2_modifiers to MetaKmsDeviceCaps
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms/impl-device: Add addfb2_modifiers to MetaKmsDeviceCaps
- Date: Fri, 8 Apr 2022 16:49:11 +0000 (UTC)
commit 11e6100226006b5371de30310357582db64c9309
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Tue Apr 5 17:05:17 2022 +0800
kms/impl-device: Add addfb2_modifiers to MetaKmsDeviceCaps
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2359>
src/backends/native/meta-kms-impl-device.c | 6 ++++++
src/backends/native/meta-kms-impl-device.h | 1 +
2 files changed, 7 insertions(+)
---
diff --git a/src/backends/native/meta-kms-impl-device.c b/src/backends/native/meta-kms-impl-device.c
index b05bf5fdab..ec1a0e5a45 100644
--- a/src/backends/native/meta-kms-impl-device.c
+++ b/src/backends/native/meta-kms-impl-device.c
@@ -303,6 +303,7 @@ init_caps (MetaKmsImplDevice *impl_device)
uint64_t cursor_width, cursor_height;
uint64_t prefer_shadow;
uint64_t uses_monotonic_clock;
+ uint64_t addfb2_modifiers;
fd = meta_device_file_get_fd (priv->device_file);
if (drmGetCap (fd, DRM_CAP_CURSOR_WIDTH, &cursor_width) == 0 &&
@@ -325,6 +326,11 @@ init_caps (MetaKmsImplDevice *impl_device)
{
priv->caps.uses_monotonic_clock = uses_monotonic_clock;
}
+
+ if (drmGetCap (fd, DRM_CAP_ADDFB2_MODIFIERS, &addfb2_modifiers) == 0)
+ {
+ priv->caps.addfb2_modifiers = (addfb2_modifiers != 0);
+ }
}
static void
diff --git a/src/backends/native/meta-kms-impl-device.h b/src/backends/native/meta-kms-impl-device.h
index e81f00e39c..286c2700a6 100644
--- a/src/backends/native/meta-kms-impl-device.h
+++ b/src/backends/native/meta-kms-impl-device.h
@@ -40,6 +40,7 @@ typedef struct _MetaKmsDeviceCaps
gboolean prefers_shadow_buffer;
gboolean uses_monotonic_clock;
+ gboolean addfb2_modifiers;
} MetaKmsDeviceCaps;
typedef struct _MetaKmsProp MetaKmsProp;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]