Update to 40.1

Fixes #1951146
This commit is contained in:
Florian Müllner 2021-05-13 17:27:34 +02:00 committed by Florian Müllner
parent a57ce729ca
commit bd81524b8c
5 changed files with 16 additions and 270 deletions

View File

@ -1,4 +1,4 @@
From fdd8a6f6760034707428554f50c09db2c5f2efcb Mon Sep 17 00:00:00 2001 From f1f55d341939f916aa533a28cbaabb10e9d8566c Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com> From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 9 Mar 2021 17:21:59 -0800 Date: Tue, 9 Mar 2021 17:21:59 -0800
Subject: [PATCH] Test: deny atomic KMS for "tegra" (RHBZ #1936991) Subject: [PATCH] Test: deny atomic KMS for "tegra" (RHBZ #1936991)
@ -10,17 +10,19 @@ Signed-off-by: Adam Williamson <awilliam@redhat.com>
2 files changed, 2 insertions(+) 2 files changed, 2 insertions(+)
diff --git a/data/61-mutter.rules b/data/61-mutter.rules diff --git a/data/61-mutter.rules b/data/61-mutter.rules
index 59cc00007c..f04e536f80 100644 index bfe63a8e9..ea7740833 100644
--- a/data/61-mutter.rules --- a/data/61-mutter.rules
+++ b/data/61-mutter.rules +++ b/data/61-mutter.rules
@@ -1 +1,2 @@ @@ -2,3 +2,4 @@ DRIVERS=="i915", SUBSYSTEM=="drm", TAG+="mutter-device-disable-kms-modifiers"
DRIVER=="tegra-host1x", SUBSYSTEM=="platform", TAG+="mutter-device-requires-kms-modifiers" DRIVERS=="nouveau", SUBSYSTEM=="drm", TAG+="mutter-device-disable-kms-modifiers"
DRIVERS=="amdgpu", SUBSYSTEM=="drm", TAG+="mutter-device-disable-kms-modifiers"
DRIVER=="vkms", SUBSYSTEM=="platform", TAG+="mutter-device-ignore"
+DRIVER=="tegra", SUBSYSTEM=="platform", TAG+="mutter-device-disable-atomic-kms" +DRIVER=="tegra", SUBSYSTEM=="platform", TAG+="mutter-device-disable-atomic-kms"
diff --git a/src/backends/native/meta-kms-device.c b/src/backends/native/meta-kms-device.c diff --git a/src/backends/native/meta-kms-device.c b/src/backends/native/meta-kms-device.c
index b5b50d602c..f86ca2ab56 100644 index c388096d5..ef65cf82b 100644
--- a/src/backends/native/meta-kms-device.c --- a/src/backends/native/meta-kms-device.c
+++ b/src/backends/native/meta-kms-device.c +++ b/src/backends/native/meta-kms-device.c
@@ -246,6 +246,7 @@ is_atomic_allowed (const char *driver_name) @@ -252,6 +252,7 @@ is_atomic_allowed (const char *driver_name)
"vmwgfx", "vmwgfx",
"vboxvideo", "vboxvideo",
"nvidia-drm", "nvidia-drm",
@ -29,5 +31,5 @@ index b5b50d602c..f86ca2ab56 100644
}; };
-- --
2.30.1 2.31.1

View File

@ -1,30 +0,0 @@
From e3bd764491b65b21650997966b7396879d642b10 Mon Sep 17 00:00:00 2001
From: Takao Fujiwara <tfujiwar@redhat.com>
Date: Thu, 25 Mar 2021 17:24:19 +0900
Subject: [PATCH] clutter/input-method: Calculate evdev_code from keycode
evdev_cocde is forwarded in meta-wayland-keyboard.c:default_grab_key()
in mutter 40 and clutter_input_method_forward_key() should assign
evdev_code.
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1709#
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1802>
---
clutter/clutter/clutter-input-method.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/clutter/clutter/clutter-input-method.c b/clutter/clutter/clutter-input-method.c
index b24df2e80e..ff62925a51 100644
--- a/clutter/clutter/clutter-input-method.c
+++ b/clutter/clutter/clutter-input-method.c
@@ -495,6 +495,7 @@ clutter_input_method_forward_key (ClutterInputMethod *im,
event->key.modifier_state = state;
event->key.keyval = keyval;
event->key.hardware_keycode = keycode;
+ event->key.evdev_code = keycode - 8;
event->key.unicode_value = clutter_keysym_to_unicode (keyval);
clutter_event_set_device (event, keyboard);
--
GitLab

View File

@ -1,223 +0,0 @@
From 751d94b8f1abc1ec94a8f0bb4a9ec358ac5ad1c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 25 Mar 2021 15:52:02 +0100
Subject: [PATCH 1/3] onscreen/native: Remove redundant EGLSurface cleanup
It's handled by CoglOnscreenEgl its dispose() implementation. It was
failed to be invoked in the past because the old non-GObject web of
vtables were not setup correctly, meaning the old generic EGL layer of
the CoglOnscreen de-init was never inovked.
When the type inheritence was cleaned up, this mistake was not cleaned
up, so do that now.
---
src/backends/native/meta-onscreen-native.c | 44 ----------------------
1 file changed, 44 deletions(-)
diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c
index 53388e3f64..5ca7408114 100644
--- a/src/backends/native/meta-onscreen-native.c
+++ b/src/backends/native/meta-onscreen-native.c
@@ -2040,58 +2040,18 @@ meta_onscreen_native_new (MetaRendererNative *renderer_native,
return onscreen_native;
}
-static void
-destroy_egl_surface (CoglOnscreen *onscreen)
-{
- CoglOnscreenEgl *onscreen_egl = COGL_ONSCREEN_EGL (onscreen);
- EGLSurface egl_surface;
-
- egl_surface = cogl_onscreen_egl_get_egl_surface (onscreen_egl);
- if (cogl_onscreen_egl_get_egl_surface (onscreen_egl) != EGL_NO_SURFACE)
- {
- MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen);
- MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native);
- CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
- CoglContext *cogl_context = cogl_framebuffer_get_context (framebuffer);
- CoglRenderer *cogl_renderer = cogl_context->display->renderer;
- CoglRendererEGL *cogl_renderer_egl = cogl_renderer->winsys;
-
- meta_egl_destroy_surface (egl,
- cogl_renderer_egl->edpy,
- egl_surface,
- NULL);
- cogl_onscreen_egl_set_egl_surface (onscreen_egl, EGL_NO_SURFACE);
- }
-}
-
static void
meta_onscreen_native_dispose (GObject *object)
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (object);
CoglOnscreen *onscreen = COGL_ONSCREEN (framebuffer);
CoglContext *cogl_context = cogl_framebuffer_get_context (framebuffer);
- CoglDisplay *cogl_display = cogl_context_get_display (cogl_context);
- CoglDisplayEGL *cogl_display_egl = cogl_display->winsys;
- CoglOnscreenEgl *onscreen_egl = COGL_ONSCREEN_EGL (onscreen);
MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen);
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
MetaRendererNativeGpuData *renderer_gpu_data;
- EGLSurface egl_surface;
G_OBJECT_CLASS (meta_onscreen_native_parent_class)->dispose (object);
- egl_surface = cogl_onscreen_egl_get_egl_surface (onscreen_egl);
- if (egl_surface != EGL_NO_SURFACE &&
- (cogl_display_egl->current_draw_surface == egl_surface ||
- cogl_display_egl->current_read_surface == egl_surface))
- {
- if (!_cogl_winsys_egl_make_current (cogl_display,
- cogl_display_egl->dummy_surface,
- cogl_display_egl->dummy_surface,
- cogl_display_egl->egl_context))
- g_warning ("Failed to clear current context");
- }
-
renderer_gpu_data =
meta_renderer_native_get_gpu_data (renderer_native,
onscreen_native->render_gpu);
@@ -2104,8 +2064,6 @@ meta_onscreen_native_dispose (GObject *object)
free_current_bo (onscreen);
- destroy_egl_surface (onscreen);
-
g_clear_pointer (&onscreen_native->gbm.surface, gbm_surface_destroy);
break;
case META_RENDERER_NATIVE_MODE_SURFACELESS:
@@ -2115,8 +2073,6 @@ meta_onscreen_native_dispose (GObject *object)
case META_RENDERER_NATIVE_MODE_EGL_DEVICE:
g_clear_object (&onscreen_native->egl.dumb_fb);
- destroy_egl_surface (onscreen);
-
if (onscreen_native->egl.stream != EGL_NO_STREAM_KHR)
{
MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native);
--
2.30.2
From 0771f48dbc044469785e700421baabbfe7f57d12 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 25 Mar 2021 16:22:33 +0100
Subject: [PATCH 2/3] onscreen/native: Release buffer before destroying
EGLSurface
Destroying the EGLSurface frees the underlying container structs. When
we call gbm_surface_release_buffer() with a gbm_surface the EGLSurface
was created from, doing that after the EGLSurface was destroyed results
in attempts to access freed memory. Fix this by releasing any buffer
first, followed by destroying the EGLSurface, and lastly, the
gbm_surface.
This was not a problem prior to CoglOnscreen turning into a GObject, as
in that case, the dispose-chain was not setup correctly, and the
EGLSurface destruction was done in the native backend implementation.
---
src/backends/native/meta-onscreen-native.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c
index 5ca7408114..12fe57c5d5 100644
--- a/src/backends/native/meta-onscreen-native.c
+++ b/src/backends/native/meta-onscreen-native.c
@@ -2050,8 +2050,6 @@ meta_onscreen_native_dispose (GObject *object)
MetaRendererNative *renderer_native = onscreen_native->renderer_native;
MetaRendererNativeGpuData *renderer_gpu_data;
- G_OBJECT_CLASS (meta_onscreen_native_parent_class)->dispose (object);
-
renderer_gpu_data =
meta_renderer_native_get_gpu_data (renderer_native,
onscreen_native->render_gpu);
@@ -2063,8 +2061,6 @@ meta_onscreen_native_dispose (GObject *object)
g_return_if_fail (onscreen_native->gbm.next_fb == NULL);
free_current_bo (onscreen);
-
- g_clear_pointer (&onscreen_native->gbm.surface, gbm_surface_destroy);
break;
case META_RENDERER_NATIVE_MODE_SURFACELESS:
g_assert_not_reached ();
@@ -2089,6 +2085,9 @@ meta_onscreen_native_dispose (GObject *object)
#endif /* HAVE_EGL_DEVICE */
}
+ G_OBJECT_CLASS (meta_onscreen_native_parent_class)->dispose (object);
+
+ g_clear_pointer (&onscreen_native->gbm.surface, gbm_surface_destroy);
g_clear_pointer (&onscreen_native->secondary_gpu_state,
secondary_gpu_state_free);
}
--
2.30.2
From 4999c771f147e3ef2c95bad45147d801a38dc458 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 25 Mar 2021 18:24:10 +0100
Subject: [PATCH 3/3] onscreen/native: Make sure to reset the EGL context after
dGPU blit
On hybrid graphics system, the primary path used to transfer the stage
framebuffer onto the dedicated GPU's video memory preparing for scanout,
is using the dedicated GPU to glBlitFramebuffer() the content from the
iGPU texture onto the scanout buffer.
After we have done this, we reset the current EGL context back to the
one managed by cogl. What we failed to do, however, was to reset the
current EGL context when we inhibited the actual page flip due to having
entered power save mode.
When we later started to paint again, Cogl thought the current EGL
context was still the correct one, but in fact it was the one used for
the iGPU -> dGPU blit, causing various EGL surface errors, and as a side
effect, eventually hitting an assert.
Fix this by making sure we reset to the Cogl managed EGL context also
for this case.
---
src/backends/native/meta-onscreen-native.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c
index 12fe57c5d5..e3d9a184f5 100644
--- a/src/backends/native/meta-onscreen-native.c
+++ b/src/backends/native/meta-onscreen-native.c
@@ -1071,6 +1071,15 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
update_secondary_gpu_state_post_swap_buffers (onscreen, &egl_context_changed);
+ /*
+ * If we changed EGL context, cogl will have the wrong idea about what is
+ * current, making it fail to set it when it needs to. Avoid that by making
+ * EGL_NO_CONTEXT current now, making cogl eventually set the correct
+ * context.
+ */
+ if (egl_context_changed)
+ _cogl_winsys_egl_ensure_current (cogl_display);
+
power_save_mode = meta_monitor_manager_get_power_save_mode (monitor_manager);
if (power_save_mode == META_POWER_SAVE_ON)
{
@@ -1089,15 +1098,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
return;
}
- /*
- * If we changed EGL context, cogl will have the wrong idea about what is
- * current, making it fail to set it when it needs to. Avoid that by making
- * EGL_NO_CONTEXT current now, making cogl eventually set the correct
- * context.
- */
- if (egl_context_changed)
- _cogl_winsys_egl_ensure_current (cogl_display);
-
COGL_TRACE_BEGIN_SCOPED (MetaRendererNativePostKmsUpdate,
"Onscreen (post pending update)");
kms_crtc = meta_crtc_kms_get_kms_crtc (META_CRTC_KMS (onscreen_native->crtc));
--
2.30.2

View File

@ -9,8 +9,8 @@
%global tarball_version %%(echo %{version} | tr '~' '.') %global tarball_version %%(echo %{version} | tr '~' '.')
Name: mutter Name: mutter
Version: 40.0 Version: 41.0
Release: 5%{?dist} Release: 1%{?dist}
Summary: Window and compositing manager based on Clutter Summary: Window and compositing manager based on Clutter
License: GPLv2+ License: GPLv2+
@ -26,13 +26,6 @@ Patch1: 0001-Revert-build-Do-not-provide-built-sources-as-libmutt.patch
# Workaround for RHBZ#1936991 (blocks atomic KMS on "tegra" driver) # Workaround for RHBZ#1936991 (blocks atomic KMS on "tegra" driver)
Patch2: 0001-Test-deny-atomic-KMS-for-tegra-RHBZ-1936991.patch Patch2: 0001-Test-deny-atomic-KMS-for-tegra-RHBZ-1936991.patch
# Fix crash on resume (rhbz#1941971)
Patch3: egl-surface-fixes.patch
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1802
# Fix enter, space, backspace keys not working with input methods
Patch4: 1802.patch
BuildRequires: chrpath BuildRequires: chrpath
BuildRequires: pango-devel BuildRequires: pango-devel
BuildRequires: startup-notification-devel BuildRequires: startup-notification-devel
@ -175,6 +168,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests %{_datadir}/mutter-%{mutter_api_version}/tests
%changelog %changelog
* Thu May 14 2021 Florian Müllner <fmuellner@redhat.com> - 40.1-1
- Update to 40.1
Resolves: #1951146
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 40.0-5 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 40.0-5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937

View File

@ -1 +1 @@
SHA512 (mutter-40.0.tar.xz) = af4fd21e5ea7e2cf1004d6912771279cebb2fc60f51f5c7371fd5f6fefbfbd7e36841de98757b8f116b0d2006c1151ccf74ed03ee62836cf59d2a86eaf48084d SHA512 (mutter-40.1.tar.xz) = c2b6603e1d55492916f742f9cb8e15588cb30e78c37de987404ac40d3befa65e417184305ad87fdffc41052a094790f9e324a1ea7482e5de4f0439dceefed118