diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 07:54:17 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 05:40:36 +0300 |
commit | 5b1ab0c2c79c3556c4350f4f47d11745fdffad8f (patch) | |
tree | 920447b89c54533a5d5cd53aabb4b89b00f97b95 /drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | |
parent | adb53d2773a7b0e95bb47e092c71906c7d989366 (diff) | |
download | linux-5b1ab0c2c79c3556c4350f4f47d11745fdffad8f.tar.xz |
drm/nouveau/imem/nv04-nv40: directly use instmem for vbios/ramfc/ramro
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c index 3ac55481cc97..5a2709d499e9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c @@ -155,10 +155,10 @@ static void nv40_instmem_dtor(struct nvkm_object *object) { struct nv40_instmem *imem = (void *)object; - nvkm_gpuobj_ref(NULL, &imem->base.ramfc); - nvkm_gpuobj_ref(NULL, &imem->base.ramro); + nvkm_memory_del(&imem->base.ramfc); + nvkm_memory_del(&imem->base.ramro); nvkm_ramht_ref(NULL, &imem->base.ramht); - nvkm_gpuobj_ref(NULL, &imem->base.vbios); + nvkm_memory_del(&imem->base.vbios); nvkm_mm_fini(&imem->heap); if (imem->iomem) iounmap(imem->iomem); @@ -221,7 +221,7 @@ nv40_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine, return ret; /* 0x00000-0x10000: reserve for probable vbios image */ - ret = nvkm_gpuobj_new(nv_object(imem), NULL, 0x10000, 0, 0, + ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, 0x10000, 0, false, &imem->base.vbios); if (ret) return ret; @@ -235,7 +235,7 @@ nv40_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine, /* 0x18000-0x18200: reserve for RAMRO * 0x18200-0x20000: padding */ - ret = nvkm_gpuobj_new(nv_object(imem), NULL, 0x08000, 0, 0, + ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, 0x08000, 0, false, &imem->base.ramro); if (ret) return ret; @@ -243,8 +243,8 @@ nv40_instmem_ctor(struct nvkm_object *parent, struct nvkm_object *engine, /* 0x20000-0x21000: reserve for RAMFC * 0x21000-0x40000: padding and some unknown crap */ - ret = nvkm_gpuobj_new(nv_object(imem), NULL, 0x20000, 0, - NVOBJ_FLAG_ZERO_ALLOC, &imem->base.ramfc); + ret = nvkm_memory_new(device, NVKM_MEM_TARGET_INST, 0x20000, 0, true, + &imem->base.ramfc); if (ret) return ret; |