Lines Matching full:ram

25 #include "ram.h"
33 struct nvkm_ram *ram; member
41 return nvkm_instobj_wrap(nvkm_vram(memory)->ram->fb->subdev.device, memory, pmemory); in nvkm_vram_kmap()
94 mutex_lock(&vram->ram->mutex); in nvkm_vram_dtor()
97 nvkm_mm_free(&vram->ram->vram, &node); in nvkm_vram_dtor()
99 mutex_unlock(&vram->ram->mutex); in nvkm_vram_dtor()
123 struct nvkm_ram *ram; in nvkm_ram_wrap() local
126 if (!device->fb || !(ram = device->fb->ram)) in nvkm_ram_wrap()
128 ram = device->fb->ram; in nvkm_ram_wrap()
134 vram->ram = ram; in nvkm_ram_wrap()
151 struct nvkm_ram *ram; in nvkm_ram_get() local
161 if (!device->fb || !(ram = device->fb->ram)) in nvkm_ram_get()
163 ram = device->fb->ram; in nvkm_ram_get()
164 mm = &ram->vram; in nvkm_ram_get()
169 vram->ram = ram; in nvkm_ram_get()
173 mutex_lock(&ram->mutex); in nvkm_ram_get()
181 mutex_unlock(&ram->mutex); in nvkm_ram_get()
190 mutex_unlock(&ram->mutex); in nvkm_ram_get()
195 nvkm_ram_init(struct nvkm_ram *ram) in nvkm_ram_init() argument
197 if (ram->func->init) in nvkm_ram_init()
198 return ram->func->init(ram); in nvkm_ram_init()
205 struct nvkm_ram *ram = *pram; in nvkm_ram_del() local
206 if (ram && !WARN_ON(!ram->func)) { in nvkm_ram_del()
207 if (ram->func->dtor) in nvkm_ram_del()
208 *pram = ram->func->dtor(ram); in nvkm_ram_del()
209 nvkm_mm_fini(&ram->vram); in nvkm_ram_del()
210 mutex_destroy(&ram->mutex); in nvkm_ram_del()
218 enum nvkm_ram_type type, u64 size, struct nvkm_ram *ram) in nvkm_ram_ctor() argument
240 ram->func = func; in nvkm_ram_ctor()
241 ram->fb = fb; in nvkm_ram_ctor()
242 ram->type = type; in nvkm_ram_ctor()
243 ram->size = size; in nvkm_ram_ctor()
244 mutex_init(&ram->mutex); in nvkm_ram_ctor()
246 if (!nvkm_mm_initialised(&ram->vram)) { in nvkm_ram_ctor()
247 ret = nvkm_mm_init(&ram->vram, NVKM_RAM_MM_NORMAL, 0, in nvkm_ram_ctor()