[PATCH] Do nothing when there are no platform devices

Marcin Juszkiewicz mjuszkiewicz at redhat.com
Tue Sep 8 06:53:08 PDT 2015


W dniu 02.09.2015 o 13:51, Marcin Juszkiewicz pisze:
> W dniu 01.09.2015 o 13:07, Marcin Juszkiewicz pisze:
>> W dniu 01.09.2015 o 09:23, Dave Airlie pisze:
> 
>>> and setting xf86_num_platform_devices to 1 is the question you need
>>> to answer
>>
>> Digging into it today.
> 
> OK, switched to git HEAD, ignored my patch and went digging.
> 
> drm/card0 is added but when it gets to loop in xf86platformProbeDev() it 
> exits as BusID on all entries is "(null)" which ends in 'no screens 
> found' message.
> 
> If I ignore that loop and set j=0 right after it then X11 starts properly.
> 
> So next step: find why no BusID in xf86_platform_devices entries.

devList is populated in copyScreen() function but entries lack busID:

(II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
(II) xfree86: Adding drm device (/dev/dri/card0)
(EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
(--) PCI:*(0:1:0:0) 1002:68f9:1462:2127 rev 0, Mem @ 0xe180000000/268435456, 0xe190000000/131072, I/O @ 0x00001000/256, BIOS @ 0x????????/131072
(II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
        compiled for 1.17.99, module version = 1.0.0
(==) AIGLX enabled
(==) Matched ati as autoconfigured driver 0
(==) Matched ati as autoconfigured driver 1
(==) Matched modesetting as autoconfigured driver 2
(==) Matched fbdev as autoconfigured driver 3
(EE) hrw: copyScreen() identifier=Autoconfigured Video Device busId=(null)
(EE) hrw: copyScreen() identifier=Autoconfigured Video Device busId=(null)
(EE) hrw: copyScreen() identifier=Autoconfigured Video Device busId=(null)
(EE) hrw: copyScreen() identifier=Autoconfigured Video Device busId=(null)
(==) Assigned the driver to the xf86ConfigLayout

xf86platformProbeDev() goes through xf86_platform_devices but requires busID:

(EE) hrw: xf86platformProbeDev() xf86_num_platform_devices = 1
(EE) hrw: xf86platformProbeDev() numDevs = 2
(EE) hrw: xf86platformProbeDev() driverName = radeon
(EE) hrw: xf86platformProbeDev() i=0 identifier=Autoconfigured Video Device
(EE) hrw: xf86platformProbeDev() i=0 busID=(null)
(EE) hrw: xf86platformProbeDev() i=0 syspath=/sys/devices/platform/soc/1f2b0000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/drm/card0

udev says:

P: /devices/platform/soc/1f2b0000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0
E: DEVPATH=/devices/platform/soc/1f2b0000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0
E: DRIVER=radeon
E: ID_MODEL_FROM_DATABASE=Cedar [Radeon HD 5000/6000/7350/8350 Series]
E: ID_PCI_CLASS_FROM_DATABASE=Display controller
E: ID_PCI_INTERFACE_FROM_DATABASE=VGA controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=VGA compatible controller
E: ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD/ATI]
E: MODALIAS=pci:v00001002d000068F9sv00001462sd00002127bc03sc00i00
E: PCI_CLASS=30000
E: PCI_ID=1002:68F9
E: PCI_SLOT_NAME=0000:01:00.0
E: PCI_SUBSYS_ID=1462:2127
E: SUBSYSTEM=pci
E: USEC_INITIALIZED=16176200

P: /devices/platform/soc/1f2b0000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/drm/card0
N: dri/card0
E: DEVNAME=/dev/dri/card0
E: DEVPATH=/devices/platform/soc/1f2b0000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/drm/card0
E: DEVTYPE=drm_minor
E: ID_FOR_SEAT=drm-platform-1f2b0000_pcie-pci-0000_01_00_0
E: ID_PATH=platform-1f2b0000.pcie-pci-0000:01:00.0
E: ID_PATH_TAG=platform-1f2b0000_pcie-pci-0000_01_00_0
E: MAJOR=226
E: MINOR=0
E: SUBSYSTEM=drm
E: TAGS=:seat:uaccess:master-of-seat:
E: USEC_INITIALIZED=16182484

http://malenstwo.juszkiewicz.com.pl/~hrw/test/xserver-hacking/ has full X log,
udev database dump and my debug patch.

No idea where to go next.



More information about the xorg-devel mailing list