Lines Matching refs:ram

33 	struct nvkm_ram *ram;  member
41 return nvkm_instobj_wrap(nvkm_vram(memory)->ram->fb->subdev.device, memory, pmemory); in nvkm_vram_kmap()
91 mutex_lock(&vram->ram->mutex); in nvkm_vram_dtor()
94 nvkm_mm_free(&vram->ram->vram, &node); in nvkm_vram_dtor()
96 mutex_unlock(&vram->ram->mutex); in nvkm_vram_dtor()
115 struct nvkm_ram *ram; in nvkm_ram_get() local
125 if (!device->fb || !(ram = device->fb->ram)) in nvkm_ram_get()
127 ram = device->fb->ram; in nvkm_ram_get()
128 mm = &ram->vram; in nvkm_ram_get()
133 vram->ram = ram; in nvkm_ram_get()
137 mutex_lock(&ram->mutex); in nvkm_ram_get()
145 mutex_unlock(&ram->mutex); in nvkm_ram_get()
154 mutex_unlock(&ram->mutex); in nvkm_ram_get()
159 nvkm_ram_init(struct nvkm_ram *ram) in nvkm_ram_init() argument
161 if (ram->func->init) in nvkm_ram_init()
162 return ram->func->init(ram); in nvkm_ram_init()
169 struct nvkm_ram *ram = *pram; in nvkm_ram_del() local
170 if (ram && !WARN_ON(!ram->func)) { in nvkm_ram_del()
171 if (ram->func->dtor) in nvkm_ram_del()
172 *pram = ram->func->dtor(ram); in nvkm_ram_del()
173 nvkm_mm_fini(&ram->vram); in nvkm_ram_del()
174 mutex_destroy(&ram->mutex); in nvkm_ram_del()
182 enum nvkm_ram_type type, u64 size, struct nvkm_ram *ram) in nvkm_ram_ctor() argument
204 ram->func = func; in nvkm_ram_ctor()
205 ram->fb = fb; in nvkm_ram_ctor()
206 ram->type = type; in nvkm_ram_ctor()
207 ram->size = size; in nvkm_ram_ctor()
208 mutex_init(&ram->mutex); in nvkm_ram_ctor()
210 if (!nvkm_mm_initialised(&ram->vram)) { in nvkm_ram_ctor()
211 ret = nvkm_mm_init(&ram->vram, NVKM_RAM_MM_NORMAL, 0, in nvkm_ram_ctor()