]> git.baikalelectronics.ru Git - kernel.git/commit
drm/pci: Set all supported speeds in speed cap mask for pre-3.0 devices
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 4 Jan 2013 19:10:37 +0000 (19:10 +0000)
committerDave Airlie <airlied@redhat.com>
Fri, 8 Feb 2013 03:54:30 +0000 (13:54 +1000)
commitf98819855d87f8b294cd93b2ae4947b76a233167
treedd465c57bbefe36df3b984e07395620c5ef01e2a
parent836d9a8d9f22fe832efddb6fabff49de5cb2ad68
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>
drivers/gpu/drm/drm_pci.c