On Tue, 2003-10-21 at 15:42, Scott Long wrote: > Eric Anholt wrote: > > Is there any concept of PCI domains in the kernel? > > > > This is for the DRM, while dealing with a complaint from Linus recently: > > > > > >>Please fix the fact that modern PCI is _not_ enumerated with just "bus, > >>slot, function". A lot of machines are starting to have a "domain number", > >>which allows fro multiple independent PCI subsystems in the same machine. > >> > >>On linux, you can use "pci_name(pdev)" to get a truly unique descriptor of > >>the device (within the PCI subsystem). It will look something like > >> > >> 0000:00:02.0 > >> > >>for "domain 0, bus 0, device 2, function 0". > > > > > > > > We don't have much of a concept of this (except possibly Alpha like John > mentioned, but I really cannot comment on that). Supporting it > wouldn't be terribly magical on our end until we fix busdma to support > device-device transfers. Since I don't know much context on the DRM > side, what exactly is Linus asking to change, and do we need to worry > about it? The DRM historically doesn't attach to specific devices itself. The X Server opens a /dev/dri/cardX, sees if it fits its criteria (driver name matches, no unique value currently set), then sets the "unique." The unique is a Bus ID in the form PCI:x:y:z. This unique is passed through the XF86DRI protocol to the clients, who iterate over the /dev/dri/cardX looking for one with that unique when they want to open it. Because of this whole system, the DRM also doesn't associate with framebuffer, mmio registers, or other device-specific things by itself -- it's all done by the X Server through things like the addmap ioctl. This makes using bus_space difficult. I'm working on a change so that the DRM attaches to a specific device, and thus has the unique set before the X Server gets to it (well, it's not that way due to backwards compatibility gymnastics, but that's the goal). It was prompted by another developer who's working on standalone DRI, which doesn't use the X Server at all. When the issue of the unique came up, Linus said the quote above. It looks like the "hose" on alpha is equivalent to a domain, from the linux code. For now I'm just using a domain of 0 on FreeBSD, but if the hoses have numbers that match XFree86's scheme, whatever that is, I'll use that. -- Eric Anholt eta_at_lclark.edu http://people.freebsd.org/~anholt/ anholt_at_FreeBSD.orgReceived on Tue Oct 21 2003 - 14:02:58 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:26 UTC