summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:23 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:49 +1000
commit26c9e8effebb9166eb1cfba2d164676e98c505c7 (patch)
tree96e5f84d927825fc7d527ae914aeae03257a0844 /drivers/gpu/drm/nouveau/nvkm/subdev/mmu/nv44.c
parentc7af0ff0e89327918743052d12bf5536e34c7f1a (diff)
downloadlinux-26c9e8effebb9166eb1cfba2d164676e98c505c7.tar.bz2
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.c5
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);