diff options
author | Jon Mason <jdmason@kudzu.us> | 2011-06-27 12:07:50 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-07-13 03:14:52 -0400 |
commit | 58b6542b50ded4243c26c251c0507e5f658642f6 (patch) | |
tree | f2cf26ee85607daf86983b3d10871e186a0c7dde /drivers/gpu/drm/nouveau | |
parent | d52589b785404c944e734ecc4e1d42326197613c (diff) |
DRM: remove drm_pci_device_is_pcie
drm_pci_device_is_pcie duplicates the funcationality of pci_is_pcie.
Convert callers of the former to the latter. This has the side benefit
of removing an unnecessary search in the PCI configuration space due to
using a saved PCIe capability offset.
[airlied: update for new callsite]
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_sgdma.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_instmem.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 81dadeb9debc..f9ae2fc3d6f1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c | |||
@@ -397,7 +397,7 @@ nouveau_mem_vram_init(struct drm_device *dev) | |||
397 | if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(40))) | 397 | if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(40))) |
398 | dma_bits = 40; | 398 | dma_bits = 40; |
399 | } else | 399 | } else |
400 | if (0 && drm_pci_device_is_pcie(dev) && | 400 | if (0 && pci_is_pcie(dev->pdev) && |
401 | dev_priv->chipset > 0x40 && | 401 | dev_priv->chipset > 0x40 && |
402 | dev_priv->chipset != 0x45) { | 402 | dev_priv->chipset != 0x45) { |
403 | if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(39))) | 403 | if (pci_dma_supported(dev->pdev, DMA_BIT_MASK(39))) |
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index 82fad914e648..c444cadbf849 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c | |||
@@ -429,7 +429,7 @@ nouveau_sgdma_init(struct drm_device *dev) | |||
429 | u32 aper_size, align; | 429 | u32 aper_size, align; |
430 | int ret; | 430 | int ret; |
431 | 431 | ||
432 | if (dev_priv->card_type >= NV_40 && drm_pci_device_is_pcie(dev)) | 432 | if (dev_priv->card_type >= NV_40 && pci_is_pcie(dev->pdev)) |
433 | aper_size = 512 * 1024 * 1024; | 433 | aper_size = 512 * 1024 * 1024; |
434 | else | 434 | else |
435 | aper_size = 64 * 1024 * 1024; | 435 | aper_size = 64 * 1024 * 1024; |
@@ -458,7 +458,7 @@ nouveau_sgdma_init(struct drm_device *dev) | |||
458 | dev_priv->gart_info.type = NOUVEAU_GART_HW; | 458 | dev_priv->gart_info.type = NOUVEAU_GART_HW; |
459 | dev_priv->gart_info.func = &nv50_sgdma_backend; | 459 | dev_priv->gart_info.func = &nv50_sgdma_backend; |
460 | } else | 460 | } else |
461 | if (0 && drm_pci_device_is_pcie(dev) && | 461 | if (0 && pci_is_pcie(dev->pdev) && |
462 | dev_priv->chipset > 0x40 && dev_priv->chipset != 0x45) { | 462 | dev_priv->chipset > 0x40 && dev_priv->chipset != 0x45) { |
463 | if (nv44_graph_class(dev)) { | 463 | if (nv44_graph_class(dev)) { |
464 | dev_priv->gart_info.func = &nv44_sgdma_backend; | 464 | dev_priv->gart_info.func = &nv44_sgdma_backend; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 1d08875dc8a3..20a38ca65a26 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -1111,7 +1111,7 @@ int nouveau_ioctl_getparam(struct drm_device *dev, void *data, | |||
1111 | case NOUVEAU_GETPARAM_BUS_TYPE: | 1111 | case NOUVEAU_GETPARAM_BUS_TYPE: |
1112 | if (drm_pci_device_is_agp(dev)) | 1112 | if (drm_pci_device_is_agp(dev)) |
1113 | getparam->value = NV_AGP; | 1113 | getparam->value = NV_AGP; |
1114 | else if (drm_pci_device_is_pcie(dev)) | 1114 | else if (pci_is_pcie(dev->pdev)) |
1115 | getparam->value = NV_PCIE; | 1115 | getparam->value = NV_PCIE; |
1116 | else | 1116 | else |
1117 | getparam->value = NV_PCI; | 1117 | getparam->value = NV_PCI; |
diff --git a/drivers/gpu/drm/nouveau/nv04_instmem.c b/drivers/gpu/drm/nouveau/nv04_instmem.c index e2075dec84a3..c1248e0740a3 100644 --- a/drivers/gpu/drm/nouveau/nv04_instmem.c +++ b/drivers/gpu/drm/nouveau/nv04_instmem.c | |||
@@ -42,7 +42,7 @@ int nv04_instmem_init(struct drm_device *dev) | |||
42 | rsvd *= dev_priv->engine.fifo.channels; | 42 | rsvd *= dev_priv->engine.fifo.channels; |
43 | 43 | ||
44 | /* pciegart table */ | 44 | /* pciegart table */ |
45 | if (drm_pci_device_is_pcie(dev)) | 45 | if (pci_is_pcie(dev->pdev)) |
46 | rsvd += 512 * 1024; | 46 | rsvd += 512 * 1024; |
47 | 47 | ||
48 | /* object storage */ | 48 | /* object storage */ |