提交 9fe0423e 编写于 作者: B Bjorn Helgaas 提交者: Dave Airlie

drm/pci: Use the standard #defines for PCIe Link Capability bits

Use the standard #defines rather than bare numbers for the PCIe Link
Capabilities speed bits.
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 03f6509d
...@@ -504,9 +504,9 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask) ...@@ -504,9 +504,9 @@ int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *mask)
if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB) if (lnkcap2 & PCI_EXP_LNKCAP2_SLS_8_0GB)
*mask |= DRM_PCIE_SPEED_80; *mask |= DRM_PCIE_SPEED_80;
} else { } else {
if (lnkcap & 1) if (lnkcap & PCI_EXP_LNKCAP_SLS_2_5GB)
*mask |= DRM_PCIE_SPEED_25; *mask |= DRM_PCIE_SPEED_25;
if (lnkcap & 2) if (lnkcap & PCI_EXP_LNKCAP_SLS_5_0GB)
*mask |= DRM_PCIE_SPEED_50; *mask |= DRM_PCIE_SPEED_50;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册