public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <awilliam@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/mutter] rawhide: Backport MR #5153 to fix crashes on hybrid graphics (RHBZ #2498847)
Date: Wed, 22 Jul 2026 17:37:26 GMT	[thread overview]
Message-ID: <178474184669.1.6458899047533188390.rpms-mutter-a624121c601c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/mutter
Branch : rawhide
Commit : a624121c601c59e0cc06186eb9eadbd5f7efdfca
Author : Adam Williamson <awilliam@redhat.com>
Date   : 2026-07-22T10:36:53-07:00
Stats  : +53/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mutter/c/a624121c601c59e0cc06186eb9eadbd5f7efdfca?branch=rawhide

Log:
Backport MR #5153 to fix crashes on hybrid graphics (RHBZ #2498847)

---
diff --git a/5153.patch b/5153.patch
new file mode 100644
index 0000000..d08bedf
--- /dev/null
+++ b/5153.patch
@@ -0,0 +1,48 @@
+From def264ecf556784035ddc48c1ba67b2c327f8a79 Mon Sep 17 00:00:00 2001
+From: Carlos Garnacho <carlosg@gnome.org>
+Date: Wed, 1 Jul 2026 10:32:51 +0200
+Subject: [PATCH] backends/native: Ensure GPU data when asking for gbm_device
+
+If the native cursor renderer is created at a time that a MetaGpuKms got
+its MetaRendererNative's GPU data collected by free_unused_gpu_datas(), it
+will be asking for a gbm_device in order to figure out whether using the
+cursor plane is an option, but triggering a crash since the missing GPU data
+would cause a NULL pointer dereference.
+
+Since the cursor renderer is asking for a gbm_device, it makes sense to
+make the MetaRendererNative get out of its way to get one. Ensure to create
+GPU data for it, or sanely bail out if it could not be created on the spot.
+
+Closes: https://gitlab.gnome.org/GNOME/mutter/-/work_items/4890
+Fixes: de5ee29e94 ("backends/native: Initialize HW cursor support right away")
+Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/5153>
+---
+ src/backends/native/meta-renderer-native.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
+index f11ae8bdb4b..6b5c8deefed 100644
+--- a/src/backends/native/meta-renderer-native.c
++++ b/src/backends/native/meta-renderer-native.c
+@@ -174,9 +174,18 @@ meta_gbm_device_from_gpu (MetaGpuKms *gpu_kms)
+   MetaRendererNativeGpuData *renderer_gpu_data;
+   MetaRenderDevice *render_device;
+   MetaRenderDeviceGbm *render_device_gbm;
++  g_autoptr (GError) error = NULL;
++
++  if (!meta_renderer_native_ensure_gpu_data (renderer_native, gpu_kms, &error))
++    {
++      g_warning ("meta_gbm_device_from_gpu: could not create gpu_data for gpu %s: %s",
++                 meta_gpu_kms_get_file_path (gpu_kms), error->message);
++      return NULL;
++    }
+ 
+   renderer_gpu_data = meta_renderer_native_get_gpu_data (renderer_native,
+                                                          gpu_kms);
++  g_assert (renderer_gpu_data);
+   render_device = renderer_gpu_data->render_device;
+ 
+   if (!META_IS_RENDER_DEVICE_GBM (render_device))
+-- 
+GitLab
+

diff --git a/mutter.spec b/mutter.spec
index e1922d3..8bb233c 100644
--- a/mutter.spec
+++ b/mutter.spec
@@ -30,6 +30,11 @@ Source0:       http://download.gnome.org/sources/%{name}/%{gnome_major_version}/
 # Two separate fixes are needed
 # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/5143
 Patch:         5143.patch
+# Fix crashes on hybrid graphics systems
+# https://bugzilla.redhat.com/show_bug.cgi?id=2498847
+# https://gitlab.gnome.org/GNOME/mutter/-/issues/4890
+# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/5153
+Patch:         5153.patch
 # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/5169
 Patch:         5169.patch
 

                 reply	other threads:[~2026-07-22 17:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178474184669.1.6458899047533188390.rpms-mutter-a624121c601c@fedoraproject.org \
    --to=awilliam@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox