diff --git a/0001-kms-impl-device-Add-addfb2_modifiers-to-MetaKmsDevic.patch b/0001-kms-impl-device-Add-addfb2_modifiers-to-MetaKmsDevic.patch new file mode 100644 index 0000000..f4c3ab6 --- /dev/null +++ b/0001-kms-impl-device-Add-addfb2_modifiers-to-MetaKmsDevic.patch @@ -0,0 +1,51 @@ +From 11e6100226006b5371de30310357582db64c9309 Mon Sep 17 00:00:00 2001 +From: Daniel van Vugt +Date: Tue, 5 Apr 2022 17:05:17 +0800 +Subject: [PATCH 1/2] 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 75920fe6b..d2e821338 100644 +--- a/src/backends/native/meta-kms-impl-device.c ++++ b/src/backends/native/meta-kms-impl-device.c +@@ -288,6 +288,7 @@ init_caps (MetaKmsImplDevice *impl_device) + meta_kms_impl_device_get_instance_private (impl_device); + int fd = priv->fd; + uint64_t cursor_width, cursor_height; ++ uint64_t addfb2_modifiers; + + if (drmGetCap (fd, DRM_CAP_CURSOR_WIDTH, &cursor_width) == 0 && + drmGetCap (fd, DRM_CAP_CURSOR_HEIGHT, &cursor_height) == 0) +@@ -296,6 +297,11 @@ init_caps (MetaKmsImplDevice *impl_device) + priv->caps.cursor_width = cursor_width; + priv->caps.cursor_height = cursor_height; + } ++ ++ 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 913ba992f..a82ad4155 100644 +--- a/src/backends/native/meta-kms-impl-device.h ++++ b/src/backends/native/meta-kms-impl-device.h +@@ -36,6 +36,7 @@ typedef struct _MetaKmsDeviceCaps + gboolean has_cursor_size; + uint64_t cursor_width; + uint64_t cursor_height; ++ gboolean addfb2_modifiers; + } MetaKmsDeviceCaps; + + typedef struct _MetaKmsProp MetaKmsProp; +-- +2.45.2 + diff --git a/0002-kms-device-Disable-modifiers-when-DRM_CAP_ADDFB2_MOD.patch b/0002-kms-device-Disable-modifiers-when-DRM_CAP_ADDFB2_MOD.patch new file mode 100644 index 0000000..aa0f370 --- /dev/null +++ b/0002-kms-device-Disable-modifiers-when-DRM_CAP_ADDFB2_MOD.patch @@ -0,0 +1,29 @@ +From dd94c448e94b1033b90749d77c5dc587c3b8f9f4 Mon Sep 17 00:00:00 2001 +From: Daniel van Vugt +Date: Tue, 5 Apr 2022 17:06:21 +0800 +Subject: [PATCH 2/2] kms/device: Disable modifiers when + !DRM_CAP_ADDFB2_MODIFIERS + +Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2210 +Part-of: +--- + src/backends/native/meta-kms-device.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/backends/native/meta-kms-device.c b/src/backends/native/meta-kms-device.c +index bef1e2065..7c84f14f5 100644 +--- a/src/backends/native/meta-kms-device.c ++++ b/src/backends/native/meta-kms-device.c +@@ -490,6 +490,9 @@ meta_kms_device_new (MetaKms *kms, + free (device->path); + device->path = data.out_path; + ++ if (!device->caps.addfb2_modifiers) ++ device->flags |= META_KMS_DEVICE_FLAG_DISABLE_MODIFIERS; ++ + return device; + } + +-- +2.45.2 + diff --git a/mutter.spec b/mutter.spec index 85d014c..75a5ff9 100644 --- a/mutter.spec +++ b/mutter.spec @@ -10,7 +10,7 @@ Name: mutter Version: 40.9 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -115,6 +115,11 @@ Patch47: 0001-core-Change-MetaWaylandTextInput-event-forwarding-to.patch Patch48: 0001-backends-Disambiguate-output-mapped-to-tablet-with-c.patch +# Backport https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2359 +# Resolves https://issues.redhat.com/browse/RHEL-45198 +Patch49: 0001-kms-impl-device-Add-addfb2_modifiers-to-MetaKmsDevic.patch +Patch50: 0002-kms-device-Disable-modifiers-when-DRM_CAP_ADDFB2_MOD.patch + BuildRequires: chrpath BuildRequires: pango-devel BuildRequires: startup-notification-devel @@ -262,6 +267,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter-%{mutter_api_version}/tests %changelog +* Thu Jul 04 2024 José Expósito - 40.9-17 +- Fix Wayland session with Virtio driver + Resolves: RHEL-45198 + * Tue Feb 06 2024 Carlos Garnacho - 40.9-16 - Disambiguate output mapped to tablet with connector name Resolves: RHEL-28535