aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_drm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-08-09 14:10:20 -0400
committerBen Skeggs <bskeggs@redhat.com>2014-08-09 15:12:59 -0400
commit3ee6f5b5036be4fd4e64be4233f29ee1c552c005 (patch)
tree32e85ff5165e36304dff76c46a8779bd34728de8 /drivers/gpu/drm/nouveau/nouveau_drm.c
parentb12f0ae9e8dfee55c7757f9c4be3b1154c366754 (diff)
drm/nouveau: store a pointer to vm in nouveau_cli
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 64ec1d34b484..fe99765d9fa0 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -415,9 +415,11 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)
415 415
416 if (device->card_type >= NV_50) { 416 if (device->card_type >= NV_50) {
417 ret = nouveau_vm_new(nv_device(drm->device), 0, (1ULL << 40), 417 ret = nouveau_vm_new(nv_device(drm->device), 0, (1ULL << 40),
418 0x1000, &drm->client.base.vm); 418 0x1000, &drm->client.vm);
419 if (ret) 419 if (ret)
420 goto fail_device; 420 goto fail_device;
421
422 drm->client.base.vm = drm->client.vm;
421 } 423 }
422 424
423 ret = nouveau_ttm_init(drm); 425 ret = nouveau_ttm_init(drm);
@@ -725,11 +727,13 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
725 727
726 if (nv_device(drm->device)->card_type >= NV_50) { 728 if (nv_device(drm->device)->card_type >= NV_50) {
727 ret = nouveau_vm_new(nv_device(drm->device), 0, (1ULL << 40), 729 ret = nouveau_vm_new(nv_device(drm->device), 0, (1ULL << 40),
728 0x1000, &cli->base.vm); 730 0x1000, &cli->vm);
729 if (ret) { 731 if (ret) {
730 nouveau_cli_destroy(cli); 732 nouveau_cli_destroy(cli);
731 goto out_suspend; 733 goto out_suspend;
732 } 734 }
735
736 cli->base.vm = cli->vm;
733 } 737 }
734 738
735 fpriv->driver_priv = cli; 739 fpriv->driver_priv = cli;