lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22e8f3a4-63e6-63bd-9e6a-c0a42cb2c33a@suse.de>
Date:   Wed, 6 Sep 2023 09:00:37 +0200
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     suijingfeng <suijingfeng@...ngson.cn>,
        Sui Jingfeng <sui.jingfeng@...ux.dev>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        "Koenig, Christian" <Christian.Koenig@....com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Daniel Vetter <daniel@...ll.ch>,
        "Deucher, Alexander" <Alexander.Deucher@....com>
Cc:     nouveau@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org, linux-pci@...r.kernel.org
Subject: Re: [Nouveau] [RFC, drm-misc-next v4 0/9] PCI/VGA: Allowing the user
 to select the primary video adapter at boot time

Hi

Am 06.09.23 um 04:14 schrieb suijingfeng:
> Hi,
> 
> 
> On 2023/9/5 23:05, Thomas Zimmermann wrote:
>> However, on modern Linux systems the primary display does not really 
>> exist.
> 
> 
> No, it do exist.  X server need to know which one is the primary GPU.
> The '*' character at the of (4@0:0:0) PCI device is the Primary.
> The '*' denote primary, see the log below.
> 
> (II) xfree86: Adding drm device (/dev/dri/card2)
> (II) xfree86: Adding drm device (/dev/dri/card0)
> (II) Platform probe for 
> /sys/devices/pci0000:00/0000:00:1c.5/0000:003:00.0/0000:04:00.0/drm/card0
> (II) xfree86: Adding drm device (/dev/dri/card3)
> (II) Platform probe for 
> /sys/devices/pci0000:00/0000:00:1c.6/0000:005:00.0/drm/card3
> (--) PCI: (0@0:2:0) 8086:3e91:8086:3e91 rev 0, Mem @ 
> 0xdb000000/167777216, 0xa0000000/536870912, I/O @ 0x0000f000/64, BIOS @ 
> 0x????????/131072
> (--) PCI: (1@0:0:0) 1002:6771:1043:8636 rev 0, Mem @ 
> 0xc0000000/2688435456, 0xdf220000/131072, I/O @ 0x0000e000/256, BIOS @ 
> 0x????????/131072
> (--) PCI:*(4@0:0:0) 1a03:2000:1a03:2000 rev 48, Mem @ 
> 0xde000000/166777216, 0xdf020000/131072, I/O @ 0x0000c000/128, BIOS @ 
> 0x????????/131072
> (--) PCI: (5@0:0:0) 10de:1288:174b:b324 rev 161, Mem @ 
> 0xdc000000/116777216, 0xd0000000/134217728, 0xd8000000/33554432, I/O @ 
> 0x0000b000/128, BIOS @@0x????????/524288
> 
> The modesetting driver of X server will create framebuffer on the 
> primary video adapter.
> If a 2D video adapter (like the aspeed BMC) is not the primary, then it 
> probably will not
> be used. The only chance to be able to display something is to 
> functional as a output slave.
> But the output slave technology need the PRIME support for cross driver 
> buffer sharing.
> 
> So, there do have some difference between the primary and non-primary 
> video adapters.

Xorg is a pretty bad example, because X parses the PCI bus and then 
tries to match devices to /dev/dri/ files. That's also not fixable in 
Xorg's current code base. Please don't promote Xorg's design. It dates 
back to the time when Xorg did the modesetting by itself.

Userspace should just open existing device files and start rendering. 
Maybe pick the previous settings and/or do some guess work about the 
arrangment of these devices. AFAIK that's what the modern compositors do.

Best regards
Thomas

> 
> 
>> 'Primary' is the device that is available via VGA, VESA or EFI. Our 
>> drivers don't use these interfaces, but the native registers. As you 
>> said yourself, these firmware devices (VGA, VESA, EFI) are removed 
>> ASAP by the native drivers. 
> 

-- 
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)

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ