[Nouveau] [RFC, drm-misc-next v4 0/9] PCI/VGA: Allowing the user to select the primary video adapter at boot time

Thomas Zimmermann tzimmermann at suse.de
Wed Sep 6 07:00:37 UTC 2023


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 at 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 at 0:2:0) 8086:3e91:8086:3e91 rev 0, Mem @ 
> 0xdb000000/167777216, 0xa0000000/536870912, I/O @ 0x0000f000/64, BIOS @ 
> 0x????????/131072
> (--) PCI: (1 at 0:0:0) 1002:6771:1043:8636 rev 0, Mem @ 
> 0xc0000000/2688435456, 0xdf220000/131072, I/O @ 0x0000e000/256, BIOS @ 
> 0x????????/131072
> (--) PCI:*(4 at 0:0:0) 1a03:2000:1a03:2000 rev 48, Mem @ 
> 0xde000000/166777216, 0xdf020000/131072, I/O @ 0x0000c000/128, BIOS @ 
> 0x????????/131072
> (--) PCI: (5 at 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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20230906/c3568a88/attachment.sig>


More information about the Nouveau mailing list