Lines Matching full:ram
25 #include "ram.h"
32 struct nvkm_ram *ram; member
84 mutex_lock(&vram->ram->fb->subdev.mutex); in nvkm_vram_dtor()
87 nvkm_mm_free(&vram->ram->vram, &node); in nvkm_vram_dtor()
89 mutex_unlock(&vram->ram->fb->subdev.mutex); in nvkm_vram_dtor()
107 struct nvkm_ram *ram; in nvkm_ram_get() local
117 if (!device->fb || !(ram = device->fb->ram)) in nvkm_ram_get()
119 ram = device->fb->ram; in nvkm_ram_get()
120 mm = &ram->vram; in nvkm_ram_get()
125 vram->ram = ram; in nvkm_ram_get()
129 mutex_lock(&ram->fb->subdev.mutex); in nvkm_ram_get()
137 mutex_unlock(&ram->fb->subdev.mutex); in nvkm_ram_get()
146 mutex_unlock(&ram->fb->subdev.mutex); in nvkm_ram_get()
151 nvkm_ram_init(struct nvkm_ram *ram) in nvkm_ram_init() argument
153 if (ram->func->init) in nvkm_ram_init()
154 return ram->func->init(ram); in nvkm_ram_init()
161 struct nvkm_ram *ram = *pram; in nvkm_ram_del() local
162 if (ram && !WARN_ON(!ram->func)) { in nvkm_ram_del()
163 if (ram->func->dtor) in nvkm_ram_del()
164 *pram = ram->func->dtor(ram); in nvkm_ram_del()
165 nvkm_mm_fini(&ram->vram); in nvkm_ram_del()
173 enum nvkm_ram_type type, u64 size, struct nvkm_ram *ram) in nvkm_ram_ctor() argument
195 ram->func = func; in nvkm_ram_ctor()
196 ram->fb = fb; in nvkm_ram_ctor()
197 ram->type = type; in nvkm_ram_ctor()
198 ram->size = size; in nvkm_ram_ctor()
200 if (!nvkm_mm_initialised(&ram->vram)) { in nvkm_ram_ctor()
201 ret = nvkm_mm_init(&ram->vram, NVKM_RAM_MM_NORMAL, 0, in nvkm_ram_ctor()