Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / nouveau / nouveau_chan.c
index 8c88c5e5bf0b243444623dcb3a30f80e2aadd4dc..ff5e59db49db02d213bf21e676243da562144d07 100644 (file)
@@ -150,7 +150,8 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device,
                         */
                        args.target = NV_DMA_V0_TARGET_PCI;
                        args.access = NV_DMA_V0_ACCESS_RDWR;
-                       args.start = nv_device_resource_start(nvxx_device(device), 1);
+                       args.start = nvxx_device(device)->func->
+                               resource_addr(nvxx_device(device), 1);
                        args.limit = args.start + device->info.ram_user - 1;
                } else {
                        args.target = NV_DMA_V0_TARGET_VRAM;
@@ -159,7 +160,7 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device,
                        args.limit = device->info.ram_user - 1;
                }
        } else {
-               if (chan->drm->agp.stat == ENABLED) {
+               if (chan->drm->agp.bridge) {
                        args.target = NV_DMA_V0_TARGET_AGP;
                        args.access = NV_DMA_V0_ACCESS_RDWR;
                        args.start = chan->drm->agp.base;
@@ -327,7 +328,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
                        args.start = 0;
                        args.limit = cli->vm->mmu->limit - 1;
                } else
-               if (chan->drm->agp.stat == ENABLED) {
+               if (chan->drm->agp.bridge) {
                        args.target = NV_DMA_V0_TARGET_AGP;
                        args.access = NV_DMA_V0_ACCESS_RDWR;
                        args.start = chan->drm->agp.base;