• Home
  • Raw
  • Download

Lines Matching refs:mem

36 nouveau_mem_map(struct nouveau_mem *mem,  in nouveau_mem_map()  argument
52 args.nv50.kind = mem->kind; in nouveau_mem_map()
53 args.nv50.comp = mem->comp; in nouveau_mem_map()
60 if (mem->mem.type & NVIF_MEM_VRAM) in nouveau_mem_map()
66 args.gf100.kind = mem->kind; in nouveau_mem_map()
74 return nvif_vmm_map(vmm, vma->addr, mem->mem.size, &args, argc, &mem->mem, 0); in nouveau_mem_map()
78 nouveau_mem_fini(struct nouveau_mem *mem) in nouveau_mem_fini() argument
80 nvif_vmm_put(&mem->cli->drm->client.vmm.vmm, &mem->vma[1]); in nouveau_mem_fini()
81 nvif_vmm_put(&mem->cli->drm->client.vmm.vmm, &mem->vma[0]); in nouveau_mem_fini()
82 mutex_lock(&mem->cli->drm->master.lock); in nouveau_mem_fini()
83 nvif_mem_dtor(&mem->mem); in nouveau_mem_fini()
84 mutex_unlock(&mem->cli->drm->master.lock); in nouveau_mem_fini()
90 struct nouveau_mem *mem = nouveau_mem(reg); in nouveau_mem_host() local
91 struct nouveau_cli *cli = mem->cli; in nouveau_mem_host()
99 type = drm->ttm.type_ncoh[!!mem->kind]; in nouveau_mem_host()
103 if (mem->kind && !(mmu->type[type].type & NVIF_MEM_KIND)) in nouveau_mem_host()
104 mem->comp = mem->kind = 0; in nouveau_mem_host()
105 if (mem->comp && !(mmu->type[type].type & NVIF_MEM_COMP)) { in nouveau_mem_host()
107 mem->kind = mmu->kind[mem->kind]; in nouveau_mem_host()
108 mem->comp = 0; in nouveau_mem_host()
117 ret = nvif_mem_ctor_type(mmu, "ttmHostMem", cli->mem->oclass, type, PAGE_SHIFT, in nouveau_mem_host()
119 &args, sizeof(args), &mem->mem); in nouveau_mem_host()
127 struct nouveau_mem *mem = nouveau_mem(reg); in nouveau_mem_vram() local
128 struct nouveau_cli *cli = mem->cli; in nouveau_mem_vram()
135 switch (cli->mem->oclass) { in nouveau_mem_vram()
137 ret = nvif_mem_ctor_type(mmu, "ttmVram", cli->mem->oclass, in nouveau_mem_vram()
142 &mem->mem); in nouveau_mem_vram()
145 ret = nvif_mem_ctor_type(mmu, "ttmVram", cli->mem->oclass, in nouveau_mem_vram()
148 .bankswz = mmu->kind[mem->kind] == 2, in nouveau_mem_vram()
151 &mem->mem); in nouveau_mem_vram()
160 reg->start = mem->mem.addr >> PAGE_SHIFT; in nouveau_mem_vram()
167 struct nouveau_mem *mem = nouveau_mem(reg); in nouveau_mem_del() local
169 nouveau_mem_fini(mem); in nouveau_mem_del()
171 kfree(mem); in nouveau_mem_del()
178 struct nouveau_mem *mem; in nouveau_mem_new() local
180 if (!(mem = kzalloc(sizeof(*mem), GFP_KERNEL))) in nouveau_mem_new()
183 mem->cli = cli; in nouveau_mem_new()
184 mem->kind = kind; in nouveau_mem_new()
185 mem->comp = comp; in nouveau_mem_new()
187 *res = &mem->base; in nouveau_mem_new()