dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Emil Velikov <emil.l.velikov@gmail.com>,
	dri-devel@lists.freedesktop.org,
	"Thorsten Leemhuis (regressions address)"
	<regressions@leemhuis.info>, Gerd Hoffmann <kraxel@redhat.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@redhat.com>,
	Joachim Frieben <jfrieben@hotmail.com>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: Regression: drm: Lobotomize set_busid nonsense for !pci drivers (a325725633c2)
Date: Fri, 30 Sep 2016 19:26:49 +0200	[thread overview]
Message-ID: <3eff4361-286c-e31a-27dc-024ae42def6b@redhat.com> (raw)
In-Reply-To: <13448e3a-2ac5-3f5b-5d31-2c372d566634@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 5796 bytes --]

On 09/30/16 18:38, Hans de Goede wrote:
> Hi,
> 
> On 30-09-16 17:33, Laszlo Ersek wrote:
>> On 09/30/16 16:59, Hans de Goede wrote:
>>> Hi,
>>>
>>> On 30-09-16 16:51, Laszlo Ersek wrote:
>>>> On 09/30/16 12:35, Hans de Goede wrote:
>>>>
>>>>> Attached are 2 patches against the xserver which should fix this,
>>>>> please give them a try.
>>>>
>>>> Sorry about the delay.
>>>>
>>>> The patches don't seem to fix the issue for me. Please see the Xorg log
>>>> attached.
>>>>
>>>> I tested the patches as follows. Given that my bisection had been done
>>>> in a Fedora 24 guest, using
>>>>
>>>>   xorg-x11-server-1.18.4-4.fc24
>>>>   http://koji.fedoraproject.org/koji/buildinfo?buildID=794494
>>>>
>>>> I now rebuilt the guest kernel exactly at the failing commit (a325725
>>>> "drm: Lobotomize set_busid nonsense for !pci drivers"), and first
>>>> reproduced the issue with the above X server.
>>>>
>>>> Then, I ported your patches to "xorg-server-1.18.4" (using the upstream
>>>> xserver tree), and rebuilt the Fedora package with the backport. For
>>>> the
>>>> backport, I had to cherry-pick the following two patches from master
>>>> first:
>>>>
>>>> 1 ca8d88e50310 xfree86: recognize primary BUS_PCI device in
>>>>                xf86IsPrimaryPlatform()
>>>> 2 ea91db4b8331 config: fix GPUDevice fail when AutoAddGPU off + BusID
>>>>
>>>> This way your patches applied cleanly. (Cherry pick #1 above is
>>>> actually
>>>> necessary for semantics, while cherry pick #2 is needed for a clean
>>>> context only, and has no impact for this test.)
>>>>
>>>> That is, in total, I added the following four patches to the Fedora 24
>>>> package:
>>>>
>>>> 1 xfree86: recognize primary BUS_PCI device in xf86IsPrimaryPlatform()
>>>> 2 config: fix GPUDevice fail when AutoAddGPU off + BusID
>>>> 3 xfree86: Make adding unclaimed devices as GPU devices a separate step
>>>> 4 xfree86: Try harder to find atleast 1 non GPU Screen
>>>>
>>>> You can find the scratch build that I used for testing here:
>>>>
>>>>   xorg-x11-server-1.18.4-4.hans_bz1366842_2.fc24
>>>>   http://koji.fedoraproject.org/koji/taskinfo?taskID=15875087
>>>>
>>>> Another reason I used F24's X server as basis, rather than upstream
>>>> HEAD, is that Fedora 24 is pretty young, and it's already on kernel
>>>> 4.7.4, and I believe it will soon move to kernel 4.8, without
>>>> (necessarily) rebasing its X server package to upstream. IOW the kernel
>>>> upgrade to 4.8 will break X in Fedora 24 too, and then I expect the
>>>> Fedora X maintainers would have to cherry pick those two patches as
>>>> dependencies just the same.
>>>>
>>>> To summarize, the patches don't seem to help. I shall nonetheless thank
>>>> you for spending your Friday on this!
>>>
>>> Hmm, do you have a xorg.conf file lying around somewhere, the message
>>> about the xserver not being able to find an entry for screen 0 does
>>> not make sense ...
>>
>> Good catch, I actually had two files under "/etc/X11/xorg.conf.d/":
>>
>> * "00-keyboard.conf", from package "systemd-229-13.fc24.x86_64", with
>> contents
>>
>> ------------
>> # Read and parsed by systemd-localed. It's probably wise not to edit
>> this file
>> # manually too freely.
>> Section "InputClass"
>>         Identifier "system-keyboard"
>>         MatchIsKeyboard "on"
>>         Option "XkbLayout" "us"
>> EndSection
>> ------------
>>
>> * "01-resolution.conf", which I had created, in order to set the
>> preferred display resolution:
>>
>> ------------
>> Section "Screen"
>>   Identifier "Default Screen"
>>   Device     "Default Device"
>>   Monitor    "Default Monitor"
>> EndSection
>>
>> Section "Device"
>>   Identifier "Default Device"
>>   Driver     "modesetting"
>> EndSection
>>
>> Section "Monitor"
>>   Identifier "Default Monitor"
>>   Option     "PreferredMode"   "640x480"
>> # Option     "PreferredMode"   "1440x900"
>> EndSection
>> ------------
>>
>> I removed these files now, and repeated the test. Again, the X server
>> wouldn't start, but I think the log file looks a bit different now.
>> Attached.
> 
> Ah, ok so it seems that my initial analysis is wrong, the problem
> is not a re-occuring of the device getting identified as a GPU screen,
> libdrm sorta depends on bus-ids and the lack of one is causing the
> server to misbehave. I guess that even with a xorg.conf things
> will fail with the troublesome kernel version (might be worth
> trying).
> 
> Emil's analysis seems to be spot on. This does not seem easily
> fixable in userspace / does seem like a real regression as it
> even breaks things when specifying the device through xorg.conf
> (I or so I believe) which is something which uses to work ...

In order to check this hypothesis, I did the following:
- I downgraded my xorg-x11-server installation to the most recent
official F24 packages, that is, "1.18.4-4.fc24",
- I kept the kernel that I built exactly at the regressive commit
(a325725633c2)
- I modified "01-resolution.conf" (see it above in the context) like this:

----
Section "Device"
  Identifier "Default Device"
  Driver     "modesetting"
  BusID      "PCI:00:02:0" <------------ new option added
EndSection
----

where BusID matches the B/D/F of the virtio-vga device from "lspci".

This setup (modulo the kernel of course) was known to work, but now the
X server actually segfaults (apparently in the
xf86PlatformDeviceCheckBusID() function). Please find the logfile attached.

(NB: this is unrelated to upstream commit de9ce6757c2e -- which the
pristine FC24 build lacks -- because I don't set AutoAddGPU to "off" --
it is left at its default "on" value.)

Therefore, you are right. :)

Thanks
Laszlo

> I made the mistake of thinking the kernel change was re-triggering
> the old problem Laszlo fixed, but that does not seem to be the
> case.
> 
> Regards,
> 
> Hans


[-- Attachment #2: Xorg.0.log --]
[-- Type: text/x-log, Size: 4610 bytes --]

[     9.978] 
X.Org X Server 1.18.4
Release Date: 2016-07-19
[     9.978] X Protocol Version 11, Revision 0
[     9.978] Build Operating System:  4.6.4-301.fc24.x86_64 
[     9.978] Current Operating System: Linux ovmf-fedora 4.7.0-rc2+ #7 SMP Fri Sep 30 12:05:35 CEST 2016 x86_64
[     9.978] Kernel command line: BOOT_IMAGE=/vmlinuz-4.7.0-rc2+ root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet video=640x480 no_console_suspend console=tty console=ttyS0,115200 ignore_loglevel LANG=en_US.UTF-8
[     9.978] Build Date: 25 August 2016  05:27:31PM
[     9.978] Build ID: xorg-x11-server 1.18.4-4.fc24 
[     9.978] Current version of pixman: 0.34.0
[     9.978] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[     9.978] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     9.978] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Sep 30 19:19:13 2016
[     9.978] (==) Using config directory: "/etc/X11/xorg.conf.d"
[     9.978] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     9.979] (==) No Layout section.  Using the first Screen section.
[     9.979] (**) |-->Screen "Default Screen" (0)
[     9.979] (**) |   |-->Monitor "Default Monitor"
[     9.979] (**) |   |-->Device "Default Device"
[     9.979] (==) Automatically adding devices
[     9.979] (==) Automatically enabling devices
[     9.979] (==) Automatically adding GPU devices
[     9.979] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     9.979] (==) FontPath set to:
	catalogue:/etc/X11/fontpath.d,
	built-ins
[     9.979] (==) ModulePath set to "/usr/lib64/xorg/modules"
[     9.979] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[     9.979] (II) Loader magic: 0x824dc0
[     9.979] (II) Module ABI versions:
[     9.979] 	X.Org ANSI C Emulation: 0.4
[     9.979] 	X.Org Video Driver: 20.0
[     9.979] 	X.Org XInput driver : 22.1
[     9.979] 	X.Org Server Extension : 9.0
[     9.980] (++) using VT number 1

[     9.980] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[     9.981] (II) xfree86: Adding drm device (/dev/dri/card0)
[     9.986] (--) PCI:*(0:0:2:0) 1af4:1050:1af4:1100 rev 1, Mem @ 0xc0000000/8388608, 0x800000000/16384, 0xc0804000/4096, BIOS @ 0x????????/131072
[     9.986] (II) LoadModule: "glx"
[     9.986] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[     9.988] (II) Module glx: vendor="X.Org Foundation"
[     9.988] 	compiled for 1.18.4, module version = 1.0.0
[     9.988] 	ABI class: X.Org Server Extension, version 9.0
[     9.988] (==) AIGLX enabled
[     9.989] (II) LoadModule: "modesetting"
[     9.989] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[     9.989] (II) Module modesetting: vendor="X.Org Foundation"
[     9.989] 	compiled for 1.18.4, module version = 1.18.4
[     9.989] 	Module class: X.Org Video Driver
[     9.989] 	ABI class: X.Org Video Driver, version 20.0
[     9.989] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[     9.989] (EE) 
[     9.989] (EE) Backtrace:
[     9.989] (EE) 0: /usr/libexec/Xorg (OsLookupColor+0x139) [0x59f679]
[     9.990] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7ffa90b2176f]
[     9.990] (EE) 2: /usr/libexec/Xorg (xf86PlatformDeviceCheckBusID+0xa7) [0x49cb87]
[     9.990] (EE) 3: /usr/libexec/Xorg (xf86PlatformMatchDriver+0x4dd) [0x49754d]
[     9.991] (EE) 4: /usr/libexec/Xorg (xf86CallDriverProbe+0xb0) [0x46e530]
[     9.991] (EE) 5: /usr/libexec/Xorg (xf86BusConfig+0x46) [0x46eea6]
[     9.991] (EE) 6: /usr/libexec/Xorg (InitOutput+0x97a) [0x47d52a]
[     9.991] (EE) 7: /usr/libexec/Xorg (remove_fs_handlers+0x266) [0x43ac66]
[     9.992] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7ffa90b0d731]
[     9.992] (EE) 9: /usr/libexec/Xorg (_start+0x29) [0x424d59]
[     9.992] (EE) 10: ? (?+0x29) [0x29]
[     9.993] (EE) 
[     9.993] (EE) Segmentation fault at address 0x0
[     9.993] (EE) 
Fatal server error:
[     9.993] (EE) Caught signal 11 (Segmentation fault). Server aborting
[     9.993] (EE) 
[     9.993] (EE) 
Please consult the Fedora Project support 
	 at http://wiki.x.org
 for help. 
[     9.993] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[     9.993] (EE) 

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-09-30 17:26 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  8:54 [PATCH 01/11] drm: Move master pointer from drm_minor to drm_device Daniel Vetter
2016-06-21  8:54 ` [PATCH 02/11] drm: Clean up drm_crtc.h Daniel Vetter
2016-06-21  8:54 ` [PATCH 03/11] drm: Use dev->name as fallback for dev->unique Daniel Vetter
2016-06-21  8:54 ` [PATCH 04/11] drm/vgem: Stop calling drm_drv_set_unique Daniel Vetter
2016-06-21  8:54 ` [PATCH 05/11] drm: Don't call drm_dev_set_unique from platform drivers Daniel Vetter
2016-06-21  8:54 ` [PATCH 06/11] drm: Nuke SET_UNIQUE ioctl Daniel Vetter
2016-06-21  8:54 ` [PATCH 07/11] drm: Lobotomize set_busid nonsense for !pci drivers Daniel Vetter
2016-06-21 12:08   ` [PATCH] " Daniel Vetter
2016-09-30  3:09     ` Regression: drm: Lobotomize set_busid nonsense for !pci drivers (a325725633c2) Laszlo Ersek
2016-09-30  8:28       ` Hans de Goede
2016-09-30 10:03         ` Laszlo Ersek
2016-09-30 10:35         ` Hans de Goede
2016-09-30 14:51           ` Laszlo Ersek
2016-09-30 14:59             ` Hans de Goede
2016-09-30 15:33               ` Laszlo Ersek
2016-09-30 16:38                 ` Hans de Goede
2016-09-30 17:26                   ` Laszlo Ersek [this message]
2016-10-03 11:34                     ` Emil Velikov
2016-10-03 12:14                       ` Laszlo Ersek
2016-10-03 12:46                         ` Emil Velikov
2016-10-03 13:03                           ` Laszlo Ersek
2016-10-03 14:15                       ` Laszlo Ersek
2016-10-03 14:27                         ` Laszlo Ersek
2016-10-03 15:00                           ` Emil Velikov
2016-10-03 15:19                             ` Laszlo Ersek
2016-10-03 19:12                         ` Daniel Vetter
2016-10-03 19:36                           ` Laszlo Ersek
2016-10-03 20:34                             ` Daniel Vetter
2016-10-03 20:44                               ` Laszlo Ersek
2016-10-04  7:43                           ` Gerd Hoffmann
2016-10-05  6:34                             ` Gerd Hoffmann
2016-10-05 10:30                               ` Daniel Vetter
2016-10-05 12:43                                 ` Gerd Hoffmann
2016-10-05 13:02                                   ` Daniel Vetter
2016-09-30  9:55       ` Emil Velikov
2016-09-30 10:37         ` Emil Velikov
2016-06-21  8:54 ` [PATCH 08/11] drm: Refactor drop/set master code a bit Daniel Vetter
2016-06-21 12:20   ` [PATCH] " Daniel Vetter
2016-06-21  8:54 ` [PATCH 09/11] drm: Extract drm_is_current_master Daniel Vetter
2016-06-21  8:54 ` [PATCH 10/11] drm: Clear up master tracking booleans Daniel Vetter
2016-06-21  8:54 ` [PATCH 11/11] drm: document drm_auth.c Daniel Vetter

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=3eff4361-286c-e31a-27dc-024ae42def6b@redhat.com \
    --to=lersek@redhat.com \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=hdegoede@redhat.com \
    --cc=jfrieben@hotmail.com \
    --cc=kraxel@redhat.com \
    --cc=regressions@leemhuis.info \
    /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;
as well as URLs for NNTP newsgroup(s).