From 11e6100226006b5371de30310357582db64c9309 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Tue, 5 Apr 2022 17:05:17 +0800 Subject: [PATCH] kms/impl-device: Add addfb2_modifiers to MetaKmsDeviceCaps Part-of: --- 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 b05bf5fda..ec1a0e5a4 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 e81f00e39..286c2700a 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;