HomeFreeBSD

LinuxKPI: enhance PCI bits for DRM

Description

LinuxKPI: enhance PCI bits for DRM

In pci_domain_nr() directly return the domain which got set in
lkpifill_pci_dev() in all cases. This was missed between D27550
and 105a37cac76b971f7a94409fbdc4f508a7e97fa0 .

In order to implement pci_dev_put() harmonize further code
(which was started in the aforementioned commit) and add kobj
related bits (through the now common lkpifill_pci_dev() code)
to the DRM specific calls without adding the DRM allocated
pci devices to the pci_devices list.
Add a release for the lkpinew_pci_dev() (DRM) case so freeing
will work.
This allows the DRM created devices to use the normal kobj/refcount
logic and work with, e.g., pci_dev_put().
(For a slightly more detailed code walk see the review).

Sponsored-by: The FreeBSD Foundation
Obtained-from: bz_iwlwifi (partially)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D28188

(cherry picked from commit 1fac2cb4d6e5cfa1b8ff689213011b0fe077ffa7)

Details

Provenance
bzAuthored on Jan 28 2021, 4:23 PM
Differential Revision
D28188: linuxkpi: enhance various PCI bits
Parents
rGec06521ee872: LinuxKPI: upstream a collection of drm-kmod conflicting changes
Branches
Unknown
Tags
Unknown