From: Thomas Zimmermann <tzimmermann@suse.de>
To: Tj <tj.iam.tj@proton.me>, Marek Olsak <Marek.Olsak@amd.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"1075713@bugs.debian.org" <1075713@bugs.debian.org>
Subject: Re: Regression: firmware/sysfb.c device path
Date: Mon, 15 Jul 2024 08:44:50 +0200 [thread overview]
Message-ID: <1eb659d8-536e-401b-a427-19709a98953a@suse.de> (raw)
In-Reply-To: <lLyvPFC_APGHNfyGNHRpQy5izBikkaTPOpHooZIT3fFAoJPquSI31ZMueA99XTdr8ysir3X7O7IMdc6za-0m79vr_claeparHhoRouVgHOI=@proton.me>
Hi
Am 13.07.24 um 19:20 schrieb Tj:
> The recent commits to add the parent device path broke Debian's kvm based QA workers for testing installer ISOs after a kernel upgrade from v6.8.12 to v6.9.7. For the details:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075713
>
> It took some time to track it down since the superficial symptom appeared to involve the QXL driver. It turned out however to be the fbdev driver; specifically the change in the parent device path in sysfs reported between the two kernels:
>
> 6.8.12:
>
> /sys/class/graphics/fb0 -> ../../devices/platform/vesa-framebuffer.0/graphics/fb0
>
> 6.9.7:
>
> /sys/class/graphics/fb0 -> ../../devices/pci0000:00/0000:00:01.0/vesa-framebuffer.0/graphics/fb0
>
> This breaks xserver-xorg-core's libfbdevhw.so because it differentiates code-paths based on whether "devices/pci" is matched in the symlink.
>
> See hw/xfree86/fbdevhw/fbdevhw.c::fbdev_open()
>
> https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xfree86/fbdevhw/fbdevhw.c?ref_type=heads#L381
Amazing debugging skills!
The patch that causes the regression in X sets the PCI device as parent
for the VESA framebuffer. That means that the PCI device won't be
unplugged or suspended while the VESA framebuffer is still in use.
Without, results are undefined.
Therefore, could this be fixed in X' fbdev driver?
It currently tests against the sysfs path of the fbdev device. A fix
could look like this:
1) readlink /sys/class/graphics/fb0/device/subsystem 2) strcmp to
"bus/pci" fb0 is the fbdev device fb0/device/ is the Linux device (the
VESA/EFI framebuffer or native PCI graphics device) fb0/device/subsystem
is the Linux devices' subsystem.
The subsystem string is the path to the underlying bus. For PCI graphics
cards it's something like
../../../bus/pci
and for VESA/EFI framebuffer devices it's
../../../bus/platform
That's more correct, reliable and also keeps the correct organization of
the devices within the kernel.
Best regards
Thomas
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
next prev parent reply other threads:[~2024-07-15 6:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 17:20 Tj
2024-07-14 19:46 ` Thomas Zimmermann
2024-07-15 6:44 ` Thomas Zimmermann [this message]
2024-07-15 9:03 ` Tj
2024-07-15 9:22 ` Thomas Zimmermann
2024-07-15 9:29 ` Tj
[not found] ` <DM6PR12MB473145875C16DFDC5B0DE65FF9A92@DM6PR12MB4731.namprd12.prod.outlook.com>
2024-07-29 7:00 ` Thomas Zimmermann
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=1eb659d8-536e-401b-a427-19709a98953a@suse.de \
--to=tzimmermann@suse.de \
--cc=1075713@bugs.debian.org \
--cc=Marek.Olsak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj.iam.tj@proton.me \
/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
all inboxes | Powered by JetHome®