Lines Matching refs:imem
41 struct nv04_instmem *imem; member
49 struct nvkm_device *device = iobj->imem->base.subdev.device; in nv04_instobj_wr32()
57 struct nvkm_device *device = iobj->imem->base.subdev.device; in nv04_instobj_rd32()
76 struct nvkm_device *device = iobj->imem->base.subdev.device; in nv04_instobj_acquire()
102 mutex_lock(&iobj->imem->base.mutex); in nv04_instobj_dtor()
103 nvkm_mm_free(&iobj->imem->heap, &iobj->node); in nv04_instobj_dtor()
104 mutex_unlock(&iobj->imem->base.mutex); in nv04_instobj_dtor()
105 nvkm_instobj_dtor(&iobj->imem->base, &iobj->base); in nv04_instobj_dtor()
123 struct nv04_instmem *imem = nv04_instmem(base); in nv04_instobj_new() local
131 nvkm_instobj_ctor(&nv04_instobj_func, &imem->base, &iobj->base); in nv04_instobj_new()
133 iobj->imem = imem; in nv04_instobj_new()
135 mutex_lock(&imem->base.mutex); in nv04_instobj_new()
136 ret = nvkm_mm_head(&imem->heap, 0, 1, size, size, align ? align : 1, &iobj->node); in nv04_instobj_new()
137 mutex_unlock(&imem->base.mutex); in nv04_instobj_new()
146 nv04_instmem_rd32(struct nvkm_instmem *imem, u32 addr) in nv04_instmem_rd32() argument
148 return nvkm_rd32(imem->subdev.device, 0x700000 + addr); in nv04_instmem_rd32()
152 nv04_instmem_wr32(struct nvkm_instmem *imem, u32 addr, u32 data) in nv04_instmem_wr32() argument
154 nvkm_wr32(imem->subdev.device, 0x700000 + addr, data); in nv04_instmem_wr32()
160 struct nv04_instmem *imem = nv04_instmem(base); in nv04_instmem_oneinit() local
161 struct nvkm_device *device = imem->base.subdev.device; in nv04_instmem_oneinit()
165 imem->base.reserved = 512 * 1024; in nv04_instmem_oneinit()
167 ret = nvkm_mm_init(&imem->heap, 0, 0, imem->base.reserved, 1); in nv04_instmem_oneinit()
173 &imem->base.vbios); in nv04_instmem_oneinit()
178 ret = nvkm_ramht_new(device, 0x08000, 0, NULL, &imem->base.ramht); in nv04_instmem_oneinit()
184 &imem->base.ramfc); in nv04_instmem_oneinit()
190 &imem->base.ramro); in nv04_instmem_oneinit()
200 struct nv04_instmem *imem = nv04_instmem(base); in nv04_instmem_dtor() local
201 nvkm_memory_unref(&imem->base.ramfc); in nv04_instmem_dtor()
202 nvkm_memory_unref(&imem->base.ramro); in nv04_instmem_dtor()
203 nvkm_ramht_del(&imem->base.ramht); in nv04_instmem_dtor()
204 nvkm_memory_unref(&imem->base.vbios); in nv04_instmem_dtor()
205 nvkm_mm_fini(&imem->heap); in nv04_instmem_dtor()
206 return imem; in nv04_instmem_dtor()
223 struct nv04_instmem *imem; in nv04_instmem_new() local
225 if (!(imem = kzalloc(sizeof(*imem), GFP_KERNEL))) in nv04_instmem_new()
227 nvkm_instmem_ctor(&nv04_instmem, device, type, inst, &imem->base); in nv04_instmem_new()
228 *pimem = &imem->base; in nv04_instmem_new()