diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 07:54:23 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 05:40:49 +0300 |
commit | 26c9e8effebb9166eb1cfba2d164676e98c505c7 (patch) | |
tree | 96e5f84d927825fc7d527ae914aeae03257a0844 /drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | |
parent | c7af0ff0e89327918743052d12bf5536e34c7f1a (diff) | |
download | linux-26c9e8effebb9166eb1cfba2d164676e98c505c7.tar.xz |
drm/nouveau/device: remove pci/platform_device from common struct
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c index 7c37bd84b862..a648c2395545 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c @@ -165,7 +165,8 @@ nv44_mmu_oneinit(struct nvkm_mmu *base) struct nvkm_device *device = mmu->base.subdev.device; int ret; - mmu->nullp = pci_alloc_consistent(device->pdev, 16 * 1024, &mmu->null); + mmu->nullp = dma_alloc_coherent(device->dev, 16 * 1024, + &mmu->null, GFP_KERNEL); if (!mmu->nullp) { nvkm_warn(&mmu->base.subdev, "unable to allocate dummy pages\n"); mmu->null = 0; @@ -227,7 +228,7 @@ nv44_mmu = { int nv44_mmu_new(struct nvkm_device *device, int index, struct nvkm_mmu **pmmu) { - if (pci_find_capability(device->pdev, PCI_CAP_ID_AGP) || + if (device->type == NVKM_DEVICE_AGP || !nvkm_boolopt(device->cfgopt, "NvPCIE", true)) return nv04_mmu_new(device, index, pmmu); |