drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge

Before this fix, capabilities were read from vgapci and were incorrect.
This commit is contained in:
Jean-Sébastien Pédron 2013-12-04 19:04:56 +00:00
parent fec27435ab
commit 20fa47be09
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258930

View File

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