Don't retry using cursor plane if it failed
Resolves: RHEL-32622
This commit is contained in:
parent
4bd4a9ef20
commit
f06a8c4bed
@ -0,0 +1,69 @@
|
||||
From 4618af58cc9046142f348d16ab1150bfde8f49c4 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel van Vugt <daniel.van.vugt@canonical.com>
|
||||
Date: Wed, 20 Jul 2022 10:10:21 +0000
|
||||
Subject: [PATCH] cursor-renderer-native: Don't retry forever after GBM cursor
|
||||
functions fail
|
||||
|
||||
This avoids flooding the log with every cursor change:
|
||||
```
|
||||
(gnome-shell:19923): libmutter-WARNING **: 10:15:23.404: Realizing HW cursor failed: Failed to allocate gbm_bo: Invalid argument
|
||||
|
||||
(gnome-shell:19923): libmutter-WARNING **: 10:15:23.450: Realizing HW cursor failed: Failed to allocate gbm_bo: Invalid argument
|
||||
|
||||
(gnome-shell:19923): libmutter-WARNING **: 10:15:23.451: Realizing HW cursor failed: Failed to allocate gbm_bo: Invalid argument
|
||||
```
|
||||
|
||||
Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2354
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2520>
|
||||
---
|
||||
.../native/meta-cursor-renderer-native.c | 19 ++++++++++++++-----
|
||||
1 file changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c
|
||||
index 3c63a15d68..08c9819a12 100644
|
||||
--- a/src/backends/native/meta-cursor-renderer-native.c
|
||||
+++ b/src/backends/native/meta-cursor-renderer-native.c
|
||||
@@ -506,12 +506,9 @@ unset_crtc_cursor (MetaCursorRendererNative *native,
|
||||
}
|
||||
|
||||
static void
|
||||
-disable_hw_cursor_for_crtc (MetaKmsCrtc *kms_crtc,
|
||||
- const GError *error)
|
||||
+disable_hw_cursor_for_gpu (MetaGpuKms *gpu_kms,
|
||||
+ const GError *error)
|
||||
{
|
||||
- MetaCrtcKms *crtc_kms = meta_crtc_kms_from_kms_crtc (kms_crtc);
|
||||
- MetaCrtc *crtc = META_CRTC (crtc_kms);
|
||||
- MetaGpuKms *gpu_kms = META_GPU_KMS (meta_crtc_get_gpu (crtc));
|
||||
MetaCursorRendererNativeGpuData *cursor_renderer_gpu_data =
|
||||
meta_cursor_renderer_native_gpu_data_from_gpu (gpu_kms);
|
||||
|
||||
@@ -521,6 +518,17 @@ disable_hw_cursor_for_crtc (MetaKmsCrtc *kms_crtc,
|
||||
cursor_renderer_gpu_data->hw_cursor_broken = TRUE;
|
||||
}
|
||||
|
||||
+static void
|
||||
+disable_hw_cursor_for_crtc (MetaKmsCrtc *kms_crtc,
|
||||
+ const GError *error)
|
||||
+{
|
||||
+ MetaCrtcKms *crtc_kms = meta_crtc_kms_from_kms_crtc (kms_crtc);
|
||||
+ MetaCrtc *crtc = META_CRTC (crtc_kms);
|
||||
+ MetaGpuKms *gpu_kms = META_GPU_KMS (meta_crtc_get_gpu (crtc));
|
||||
+
|
||||
+ disable_hw_cursor_for_gpu (gpu_kms, error);
|
||||
+}
|
||||
+
|
||||
void
|
||||
meta_cursor_renderer_native_prepare_frame (MetaCursorRendererNative *cursor_renderer_native,
|
||||
MetaRendererView *view)
|
||||
@@ -1375,6 +1383,7 @@ load_cursor_sprite_gbm_buffer_for_gpu (MetaCursorRendererNative *native,
|
||||
if (!buffer)
|
||||
{
|
||||
g_warning ("Realizing HW cursor failed: %s", error->message);
|
||||
+ disable_hw_cursor_for_gpu (gpu_kms, error);
|
||||
return;
|
||||
}
|
||||
|
||||
--
|
||||
2.44.0.501.g19981daefd.dirty
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
Name: mutter
|
||||
Version: 40.9
|
||||
Release: 18%{?dist}
|
||||
Release: 19%{?dist}
|
||||
Summary: Window and compositing manager based on Clutter
|
||||
|
||||
License: GPLv2+
|
||||
@ -129,6 +129,9 @@ Patch54: 0004-window-Track-workspace-per-cgroup.patch
|
||||
Patch55: 0005-core-display-Avoid-placement-heuristcs-for-apps-that.patch
|
||||
Patch56: 0006-meson-Add-optional-libsystemd-dependency.patch
|
||||
|
||||
# Don't retry cursor plane if failed (RHEL-33720)
|
||||
Patch57: 0001-cursor-renderer-native-Don-t-retry-forever-after-GBM.patch
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: pango-devel
|
||||
BuildRequires: startup-notification-devel
|
||||
@ -276,6 +279,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/mutter-%{mutter_api_version}/tests
|
||||
|
||||
%changelog
|
||||
* Tue Aug 05 2024 Jonas Ådahl <jadahl@redhat.com>) - 40.9-19
|
||||
- Don't retry using cursor plane if it failed
|
||||
Resolves: RHEL-32622
|
||||
|
||||
* Mon Jul 29 2024 Ray Strode <rstrode@redhat.com> - 40.9-18
|
||||
- Don't allow applications on other workspaces to steal
|
||||
focus, unless their timestamps are pristine
|
||||
|
Loading…
Reference in New Issue
Block a user