Lines Matching refs:imem
42 struct nv04_instmem *imem; member
50 struct nvkm_device *device = iobj->imem->base.subdev.device; in nv04_instobj_wr32()
58 struct nvkm_device *device = iobj->imem->base.subdev.device; in nv04_instobj_rd32()
77 struct nvkm_device *device = iobj->imem->base.subdev.device; in nv04_instobj_acquire()
103 mutex_lock(&iobj->imem->base.mutex); in nv04_instobj_dtor()
104 nvkm_mm_free(&iobj->imem->heap, &iobj->node); in nv04_instobj_dtor()
105 mutex_unlock(&iobj->imem->base.mutex); in nv04_instobj_dtor()
106 nvkm_instobj_dtor(&iobj->imem->base, &iobj->base); in nv04_instobj_dtor()
124 struct nv04_instmem *imem = nv04_instmem(base); in nv04_instobj_new() local
132 nvkm_instobj_ctor(&nv04_instobj_func, &imem->base, &iobj->base); in nv04_instobj_new()
134 iobj->imem = imem; in nv04_instobj_new()
136 mutex_lock(&imem->base.mutex); in nv04_instobj_new()
137 ret = nvkm_mm_head(&imem->heap, 0, 1, size, size, align ? align : 1, &iobj->node); in nv04_instobj_new()
138 mutex_unlock(&imem->base.mutex); in nv04_instobj_new()
147 nv04_instmem_rd32(struct nvkm_instmem *imem, u32 addr) in nv04_instmem_rd32() argument
149 return nvkm_rd32(imem->subdev.device, 0x700000 + addr); in nv04_instmem_rd32()
153 nv04_instmem_wr32(struct nvkm_instmem *imem, u32 addr, u32 data) in nv04_instmem_wr32() argument
155 nvkm_wr32(imem->subdev.device, 0x700000 + addr, data); in nv04_instmem_wr32()
159 nv04_instmem_resume(struct nvkm_instmem *imem) in nv04_instmem_resume() argument
163 list_for_each_entry(iobj, &imem->boot, head) { in nv04_instmem_resume()
168 nvkm_bar_bar2_init(imem->subdev.device); in nv04_instmem_resume()
170 list_for_each_entry(iobj, &imem->list, head) { in nv04_instmem_resume()
177 nv04_instmem_suspend(struct nvkm_instmem *imem) in nv04_instmem_suspend() argument
181 list_for_each_entry(iobj, &imem->list, head) { in nv04_instmem_suspend()
189 nvkm_bar_bar2_fini(imem->subdev.device); in nv04_instmem_suspend()
191 list_for_each_entry(iobj, &imem->boot, head) { in nv04_instmem_suspend()
203 struct nv04_instmem *imem = nv04_instmem(base); in nv04_instmem_oneinit() local
204 struct nvkm_device *device = imem->base.subdev.device; in nv04_instmem_oneinit()
208 imem->base.reserved = 512 * 1024; in nv04_instmem_oneinit()
210 ret = nvkm_mm_init(&imem->heap, 0, 0, imem->base.reserved, 1); in nv04_instmem_oneinit()
216 &imem->base.vbios); in nv04_instmem_oneinit()
221 ret = nvkm_ramht_new(device, 0x08000, 0, NULL, &imem->base.ramht); in nv04_instmem_oneinit()
227 &imem->base.ramfc); in nv04_instmem_oneinit()
233 &imem->base.ramro); in nv04_instmem_oneinit()
243 struct nv04_instmem *imem = nv04_instmem(base); in nv04_instmem_dtor() local
244 nvkm_memory_unref(&imem->base.ramfc); in nv04_instmem_dtor()
245 nvkm_memory_unref(&imem->base.ramro); in nv04_instmem_dtor()
246 nvkm_ramht_del(&imem->base.ramht); in nv04_instmem_dtor()
247 nvkm_memory_unref(&imem->base.vbios); in nv04_instmem_dtor()
248 nvkm_mm_fini(&imem->heap); in nv04_instmem_dtor()
249 return imem; in nv04_instmem_dtor()
268 struct nv04_instmem *imem; in nv04_instmem_new() local
270 if (!(imem = kzalloc(sizeof(*imem), GFP_KERNEL))) in nv04_instmem_new()
272 nvkm_instmem_ctor(&nv04_instmem, device, type, inst, &imem->base); in nv04_instmem_new()
273 *pimem = &imem->base; in nv04_instmem_new()