kms/impl-device: Add addfb2_modifiers to MetaKmsDeviceCaps

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2359>
This commit is contained in:
Daniel van Vugt 2022-04-05 17:05:17 +08:00 committed by Marge Bot
parent 6c34c584c8
commit 11e6100226
2 changed files with 7 additions and 0 deletions

View File

@ -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

View File

@ -40,6 +40,7 @@ typedef struct _MetaKmsDeviceCaps
gboolean prefers_shadow_buffer;
gboolean uses_monotonic_clock;
gboolean addfb2_modifiers;
} MetaKmsDeviceCaps;
typedef struct _MetaKmsProp MetaKmsProp;