xserver/hw/xfree86/fbdevhw
Tj 728b54528d xfree86: fbdevhw: fix pci detection on recent Linux
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=1075713
[1] https://lore.kernel.org/lkml/lLyvPFC_APGHNfyGNHRpQy5izBikkaTPOpHooZIT3fFAoJPquSI31ZMueA99XTdr8ysir3X7O7IMdc6za-0m79vr_claeparHhoRouVgHOI=@proton.me/

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1714
Signed-off-by: Tj <tj.iam.tj@proton.me>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1612>
2024-10-10 21:32:46 +00:00
..
man Remove autotools support 2021-10-27 13:15:40 +03:00
README Initial revision 2003-11-14 16:48:57 +00:00
fbdevhw.c xfree86: fbdevhw: fix pci detection on recent Linux 2024-10-10 21:32:46 +00:00
fbdevhw.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
fbdevhwstub.c Make stub version of fbdevHWAdjustFrame match new prototype in fbdevhw.h 2012-06-11 18:29:16 -07:00
fbpriv.h Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
meson.build meson: Install man pages 2018-03-27 10:28:33 -04:00

This is a submodule to access linux framebuffer devices.
It is supported to work as helper module (like vgahw)
for the chipset drivers.  There are functions for
saving/restoring/setting video modes, set palette entries,
and a few more helper functions.  Some of them can be
hooked directly into ScrnInfoRec.

In ../drivers/fbdev is a "chipset" driver.  It is a simple,
non-accelerated and hardware-independent driver which works
on top of this fbdevhw submodule.

  Gerd

--
Gerd Knorr <kraxel@goldbach.in-berlin.de>