--- initial
+++ final
@@ -1,138 +1,138 @@
 int nouveau_gem_ioctl_pushbuf(struct drm_device *dev, void *data, struct drm_file *file_priv) {
   struct nouveau_abi16 *abi16 = nouveau_abi16_get(file_priv);
   struct nouveau_cli *cli = nouveau_cli(file_priv);
   struct nouveau_abi16_chan *temp;
   struct nouveau_drm *drm = nouveau_drm(dev);
   struct drm_nouveau_gem_pushbuf *req = data;
   struct drm_nouveau_gem_pushbuf_push *push;
   struct drm_nouveau_gem_pushbuf_bo *bo;
   struct nouveau_channel *chan = NULL;
   struct validate_op op;
   struct nouveau_fence *fence = NULL;
   int i, j, ret = 0, do_reloc = 0;
   if (unlikely(!abi16)) return -ENOMEM;
   list_for_each_entry(temp, &abi16->channels, head) {
     if (temp->chan->chid == req->channel) {
       chan = temp->chan;
       break;
     }
   }
   if (!chan) return nouveau_abi16_put(abi16, -ENOENT);
   req->vram_available = drm->gem.vram_available;
   req->gart_available = drm->gem.gart_available;
   if (unlikely(req->nr_push == 0)) goto out_next;
   if (unlikely(req->nr_push > NOUVEAU_GEM_MAX_PUSH)) {
     NV_PRINTK(err, cli, "pushbuf push count exceeds limit: %d max %d\n", req->nr_push, NOUVEAU_GEM_MAX_PUSH);
     return nouveau_abi16_put(abi16, -EINVAL);
   }
   if (unlikely(req->nr_buffers > NOUVEAU_GEM_MAX_BUFFERS)) {
     NV_PRINTK(err, cli, "pushbuf bo count exceeds limit: %d max %d\n", req->nr_buffers, NOUVEAU_GEM_MAX_BUFFERS);
     return nouveau_abi16_put(abi16, -EINVAL);
   }
   if (unlikely(req->nr_relocs > NOUVEAU_GEM_MAX_RELOCS)) {
     NV_PRINTK(err, cli, "pushbuf reloc count exceeds limit: %d max %d\n", req->nr_relocs, NOUVEAU_GEM_MAX_RELOCS);
     return nouveau_abi16_put(abi16, -EINVAL);
   }
   push = u_memcpya(req->push, req->nr_push, sizeof(*push));
   if (IS_ERR(push)) return nouveau_abi16_put(abi16, PTR_ERR(push));
   bo = u_memcpya(req->buffers, req->nr_buffers, sizeof(*bo));
   if (IS_ERR(bo)) {
     u_free(push);
     return nouveau_abi16_put(abi16, PTR_ERR(bo));
   }
   /* Ensure all push buffers are on validate list */
   for (i = 0; i < req->nr_push; i++) {
     if (push[i].bo_index >= req->nr_buffers) {
       NV_PRINTK(err, cli, "push %d buffer not in list\n", i);
       ret = -EINVAL;
       goto out_prevalid;
     }
   }
   /* Validate buffer list */
   ret = nouveau_gem_pushbuf_validate(chan, file_priv, bo, req->buffers, req->nr_buffers, &op, &do_reloc);
   if (ret) {
     if (ret != -ERESTARTSYS) NV_PRINTK(err, cli, "validate: %d\n", ret);
     goto out_prevalid;
   }
   /* Apply any relocations that are required */
   if (do_reloc) {
     ret = nouveau_gem_pushbuf_reloc_apply(cli, req, bo);
     if (ret) {
       NV_PRINTK(err, cli, "reloc apply: %d\n", ret);
       goto out;
     }
   }
   if (chan->dma.ib_max) {
     ret = nouveau_dma_wait(chan, req->nr_push + 1, 16);
     if (ret) {
       NV_PRINTK(err, cli, "nv50cal_space: %d\n", ret);
       goto out;
     }
     for (i = 0; i < req->nr_push; i++) {
       struct nouveau_bo *nvbo = (void *)(unsigned long)bo[push[i].bo_index].user_priv;
       nv50_dma_push(chan, nvbo, push[i].offset, push[i].length);
     }
-  } else if (drm->device.info.chipset >= 0x25) {
+  } else if (drm->client.device.info.chipset >= 0x25) {
     ret = RING_SPACE(chan, req->nr_push * 2);
     if (ret) {
       NV_PRINTK(err, cli, "cal_space: %d\n", ret);
       goto out;
     }
     for (i = 0; i < req->nr_push; i++) {
       struct nouveau_bo *nvbo = (void *)(unsigned long)bo[push[i].bo_index].user_priv;
       OUT_RING(chan, (nvbo->bo.offset + push[i].offset) | 2);
       OUT_RING(chan, 0);
     }
   } else {
     ret = RING_SPACE(chan, req->nr_push * (2 + NOUVEAU_DMA_SKIPS));
     if (ret) {
       NV_PRINTK(err, cli, "jmp_space: %d\n", ret);
       goto out;
     }
     for (i = 0; i < req->nr_push; i++) {
       struct nouveau_bo *nvbo = (void *)(unsigned long)bo[push[i].bo_index].user_priv;
       uint32_t cmd;
       cmd = chan->push.vma.offset + ((chan->dma.cur + 2) << 2);
       cmd |= 0x20000000;
       if (unlikely(cmd != req->suffix0)) {
         if (!nvbo->kmap.virtual) {
           ret = ttm_bo_kmap(&nvbo->bo, 0, nvbo->bo.mem.num_pages, &nvbo->kmap);
           if (ret) {
             WIND_RING(chan);
             goto out;
           }
           nvbo->validate_mapped = true;
         }
         nouveau_bo_wr32(nvbo, (push[i].offset + push[i].length - 8) / 4, cmd);
       }
       OUT_RING(chan, 0x20000000 | (nvbo->bo.offset + push[i].offset));
       OUT_RING(chan, 0);
       for (j = 0; j < NOUVEAU_DMA_SKIPS; j++)
         OUT_RING(chan, 0);
     }
   }
   ret = nouveau_fence_new(chan, false, &fence);
   if (ret) {
     NV_PRINTK(err, cli, "error fencing pushbuf: %d\n", ret);
     WIND_RING(chan);
     goto out;
   }
 out:
   validate_fini(&op, fence, bo);
   nouveau_fence_unref(&fence);
 out_prevalid:
   u_free(bo);
   u_free(push);
 out_next:
   if (chan->dma.ib_max) {
     req->suffix0 = 0x00000000;
     req->suffix1 = 0x00000000;
-  } else if (drm->device.info.chipset >= 0x25) {
+  } else if (drm->client.device.info.chipset >= 0x25) {
     req->suffix0 = 0x00020000;
     req->suffix1 = 0x00000000;
   } else {
     req->suffix0 = 0x20000000 | (chan->push.vma.offset + ((chan->dma.cur + 2) << 2));
     req->suffix1 = 0x00000000;
   }
   return nouveau_abi16_put(abi16, ret);
 }<sep>@@
struct nouveau_drm *drm;
@@
- drm->device
+ drm->client.device