diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2013-12-04 19:04:56 +0000 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2013-12-04 19:04:56 +0000 |
commit | a2be75236c3e2a8551bdf262f7a8492dc15261a2 (patch) | |
tree | fc30e08b0e43f497f1d77d3655eae826df7b7a28 /sys/dev/drm2/drm_pci.c | |
parent | 6fbc4f383bfcc743bdf31fcae77e28bc91b04a42 (diff) | |
download | FreeBSD-src-a2be75236c3e2a8551bdf262f7a8492dc15261a2.zip FreeBSD-src-a2be75236c3e2a8551bdf262f7a8492dc15261a2.tar.gz |
drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge
Before this fix, capabilities were read from vgapci and were incorrect.
Diffstat (limited to 'sys/dev/drm2/drm_pci.c')
-rw-r--r-- | sys/dev/drm2/drm_pci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/drm2/drm_pci.c b/sys/dev/drm2/drm_pci.c index ab45278..ac9d4e6 100644 --- a/sys/dev/drm2/drm_pci.c +++ b/sys/dev/drm2/drm_pci.c @@ -134,7 +134,11 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) if (!drm_device_is_pcie(dev)) return -EINVAL; - root = device_get_parent(dev->device); + root = + device_get_parent( /* pcib */ + device_get_parent( /* `-- pci */ + device_get_parent( /* `-- vgapci */ + dev->device))); /* `-- drmn */ pos = 0; pci_find_cap(root, PCIY_EXPRESS, &pos); |