Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xorg-x11-server for openSUSE:Factory 
checked in at 2024-07-19 15:25:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xorg-x11-server (Old)
 and      /work/SRC/openSUSE:Factory/.xorg-x11-server.new.17339 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xorg-x11-server"

Fri Jul 19 15:25:43 2024 rev:432 rq:1188381 version:21.1.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/xorg-x11-server/xorg-x11-server.changes  
2024-06-13 15:37:49.877562362 +0200
+++ 
/work/SRC/openSUSE:Factory/.xorg-x11-server.new.17339/xorg-x11-server.changes   
    2024-07-19 15:26:03.984153372 +0200
@@ -1,0 +2,9 @@
+Thu Jul 18 10:44:59 UTC 2024 - Stefan Dirsch <sndir...@suse.com>
+
+- u_fbdevhw_kernel6.9_break_fbdev_open.patch
+  * Linux kernel v6.9 has changed the symlink to point to the
+    parent device.  This breaks fbdev_open() detection logic.
+    Change it to use the subsystem symlink instead which will
+    remain stable (gitlab xserver issue#1714)
+
+-------------------------------------------------------------------

New:
----
  u_fbdevhw_kernel6.9_break_fbdev_open.patch

BETA DEBUG BEGIN:
  New:
- u_fbdevhw_kernel6.9_break_fbdev_open.patch
  * Linux kernel v6.9 has changed the symlink to point to the
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xorg-x11-server.spec ++++++
--- /var/tmp/diff_new_pack.0FYknr/_old  2024-07-19 15:26:05.400209716 +0200
+++ /var/tmp/diff_new_pack.0FYknr/_new  2024-07-19 15:26:05.404209875 +0200
@@ -147,7 +147,7 @@
 Requires:       Mesa
 %if 0%{?suse_version} >= 1315
 Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
 %endif
 Provides:       xorg-x11-server-glx
 Obsoletes:      xorg-x11-server-glx
@@ -240,6 +240,8 @@
 
 Patch1960:      u_sync-pci-ids-with-Mesa.patch
 
+Patch2000:      u_fbdevhw_kernel6.9_break_fbdev_open.patch
+
 Patch1218176:   u_miCloseScreen_check_for_null_pScreen_dev_private.patch
 Patch1222442:   U_render-Avoid-possible-double-free-in-ProcRenderAddGl.patch
 
@@ -397,6 +399,7 @@
 %patch -P 1921 -p1
 %patch -P 1930 -p1
 %patch -P 1960 -p1
+%patch -P 2000 -p1
 
 %patch -P 1218176 -p1
 

++++++ u_fbdevhw_kernel6.9_break_fbdev_open.patch ++++++
Linux kernel v6.9 has changed the symlink to point to the parent device.
This breaks fbdev_open() detection logic. Change it to use the subsystem
symlink instead which will remain stable.

Kernel v6.8:

[    14.067] (II) fbdev_open() sysfs_path=/sys/class/graphics/fb0
[    14.067] (II) fbdev_open() 
buf=../../devices/platform/vesa-framebuffer.0/graphics/fb0

Kernel v6.9:

[    15.609] (II) fbdev_open() sysfs_path=/sys/class/graphics/fb0
[    15.609] (II) fbdev_open() 
buf=../../devices/pci0000:00/0000:00:01.0/vesa-framebuffer.0/graphics/fb0

Originally found in automated Debian ISO QA testing [0] and confirmed in Linux 
[1].

Tested on kernels v6.9.7 and v6.8.12

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D1075713
[1] https://lore.kernel.org/lkml/lLyvPFC_APGHNfyGNHRpQy5izBikkaTPOpHooZIT3f=
FAoJPquSI31ZMueA99XTdr8ysir3X7O7IMdc6za-0m79vr_claeparHhoRouVgHOI=3D@proton=
.me/

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1714
Signed-off-by: Tj <tj.iam...@proton.me>
---
 hw/xfree86/fbdevhw/fbdevhw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: xorg-server-21.1.12/hw/xfree86/fbdevhw/fbdevhw.c
===================================================================
--- xorg-server-21.1.12.orig/hw/xfree86/fbdevhw/fbdevhw.c
+++ xorg-server-21.1.12/hw/xfree86/fbdevhw/fbdevhw.c
@@ -335,9 +335,9 @@ fbdev_open(int scrnIndex, const char *de
         char *sysfs_path = NULL;
         char *node = strrchr(dev, '/') + 1;
 
-        if (asprintf(&sysfs_path, "/sys/class/graphics/%s", node) < 0 ||
+        if (asprintf(&sysfs_path, "/sys/class/graphics/%s/device/subsystem", 
node) < 0 ||
             readlink(sysfs_path, buf, sizeof(buf) - 1) < 0 ||
-            strstr(buf, "devices/pci")) {
+            strstr(buf, "bus/pci")) {
             free(sysfs_path);
             close(fd);
             return -1;

Reply via email to