diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-01-04 19:10:37 +0000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-02-08 13:54:30 +1000 |
commit | f8acf6f4c8fe1fd4de1f669ac6a3c71e89f13523 (patch) | |
tree | dd465c57bbefe36df3b984e07395620c5ef01e2a /drivers/gpu/drm/drm_pci.c | |
parent | 9fe0423eac2c0781a3ece8779b086acd3e76f2c8 (diff) | |
download | blackbird-op-linux-f8acf6f4c8fe1fd4de1f669ac6a3c71e89f13523.tar.gz blackbird-op-linux-f8acf6f4c8fe1fd4de1f669ac6a3c71e89f13523.zip |
drm/pci: Set all supported speeds in speed cap mask for pre-3.0 devices
For devices that conform to PCIe r3.0 and have a Link Capabilities 2
register, we test and report every bit in the Supported Link Speeds Vector
field. For a device that supports both 2.5GT/s and 5.0GT/s, we set both
DRM_PCIE_SPEED_25 and DRM_PCIE_SPEED_50 in the returned mask.
For pre-r3.0 devices, the Link Capabilities 0010b encoding
(PCI_EXP_LNKCAP_SLS_5_0GB) means that both 5.0GT/s and 2.5GT/s are
supported, so set both DRM_PCIE_SPEED_25 and DRM_PCIE_SPEED_50 in this
case as well.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_pci.c')
-rw-r--r-- | drivers/gpu/drm/drm_pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index 11c8adde40b0..50e26f2d198e 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -507,7 +507,7 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB) *mask |= DRM_PCIE_SPEED_25; if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB) - *mask |= DRM_PCIE_SPEED_50; + *mask |= (DRM_PCIE_SPEED_25 | DRM_PCIE_SPEED_50); } DRM_INFO("probing gen 2 caps for device %x:%x = %x/%x\n", root->vendor, root->device, lnkcap, lnkcap2); |