Source: mesa
Version: 23.2.1-1
Severity: important
Tags: patch upstream
X-Debbugs-Cc: hlieber...@debian.org
Control: forwarded -1 https://gitlab.freedesktop.org/mesa/mesa/-/issues/9889
Control: affects -1 gnome-shell

Hello maintainer,

Due to a name collision in the radeonsi module, gdm under Wayland will segfault
on any machine running an Intel Iris Plus GPU. This was reported in a variety of
distro trackers (https://bugzilla.redhat.com/show_bug.cgi?id=2238711,
https://bugs.archlinux.org/task/79831, etc.).

It can be fixed trivially with the cherry-pick of a patch upstream that is
allocated to be pulled into the 23.2 release stream
(https://gitlab.freedesktop.org/mesa/mesa/-/commit/9590bce3e249a34665b2c42b20bfdbdc7f32147f).
However, due to the impact on users, it would be nice to pull it in before Mesa
makes their next release.

I've attached the patch as well for your reference.

Sincerely,

--
Harlan Lieberman-Berg
~hlieberman

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-2-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
>From 9590bce3e249a34665b2c42b20bfdbdc7f32147f Mon Sep 17 00:00:00 2001
From: WinLinux1028 <re...@hakurei.win>
Date: Tue, 11 Jul 2023 18:16:01 +0900
Subject: [PATCH] radeonsi: prefix function with si_ to prevent name collision

Fixed a build error caused by multiple gfx11_init_query symbols when building 
with iris and radeonsi specified in gallium-drivers.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9238
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24045>
---
 src/gallium/drivers/radeonsi/gfx11_query.c | 4 ++--
 src/gallium/drivers/radeonsi/si_pipe.c     | 4 ++--
 src/gallium/drivers/radeonsi/si_pipe.h     | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/gfx11_query.c 
b/src/gallium/drivers/radeonsi/gfx11_query.c
index bfcd8e2511050..2a331cc3bda25 100644
--- a/src/gallium/drivers/radeonsi/gfx11_query.c
+++ b/src/gallium/drivers/radeonsi/gfx11_query.c
@@ -422,13 +422,13 @@ struct pipe_query *gfx11_sh_query_create(struct si_screen 
*screen, enum pipe_que
    return (struct pipe_query *)query;
 }
 
-void gfx11_init_query(struct si_context *sctx)
+void si_gfx11_init_query(struct si_context *sctx)
 {
    list_inithead(&sctx->shader_query_buffers);
    sctx->atoms.s.shader_query.emit = emit_shader_query;
 }
 
-void gfx11_destroy_query(struct si_context *sctx)
+void si_gfx11_destroy_query(struct si_context *sctx)
 {
    if (!sctx->shader_query_buffers.next)
       return;
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index fb5c02c473b96..2b4fceb89b198 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -192,7 +192,7 @@ static void si_destroy_context(struct pipe_context *context)
    si_release_all_descriptors(sctx);
 
    if (sctx->gfx_level >= GFX10 && sctx->has_graphics)
-      gfx11_destroy_query(sctx);
+      si_gfx11_destroy_query(sctx);
 
    if (sctx->sqtt) {
       struct si_screen *sscreen = sctx->screen;
@@ -637,7 +637,7 @@ static struct pipe_context *si_create_context(struct 
pipe_screen *screen, unsign
    /* Initialize graphics-only context functions. */
    if (sctx->has_graphics) {
       if (sctx->gfx_level >= GFX10)
-         gfx11_init_query(sctx);
+         si_gfx11_init_query(sctx);
       si_init_msaa_functions(sctx);
       si_init_shader_functions(sctx);
       si_init_state_functions(sctx);
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h 
b/src/gallium/drivers/radeonsi/si_pipe.h
index 55f1d1788f1a1..389716854f9a6 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -1616,8 +1616,8 @@ void *si_create_query_result_cs(struct si_context *sctx);
 void *gfx11_create_sh_query_result_cs(struct si_context *sctx);
 
 /* gfx11_query.c */
-void gfx11_init_query(struct si_context *sctx);
-void gfx11_destroy_query(struct si_context *sctx);
+void si_gfx11_init_query(struct si_context *sctx);
+void si_gfx11_destroy_query(struct si_context *sctx);
 
 /* si_test_image_copy_region.c */
 void si_test_image_copy_region(struct si_screen *sscreen);
-- 
GitLab

Reply via email to