Lines Matching refs:pfb
61 nv50_ram_calc(struct nvkm_fb *pfb, u32 freq) in nv50_ram_calc() argument
63 struct nvkm_bios *bios = nvkm_bios(pfb); in nv50_ram_calc()
64 struct nv50_ram *ram = (void *)pfb->ram; in nv50_ram_calc()
83 nv_error(pfb, "invalid/missing perftab entry\n"); in nv50_ram_calc()
89 strap = nvbios_ramcfg_index(nv_subdev(pfb)); in nv50_ram_calc()
91 nv_error(pfb, "invalid ramcfg strap\n"); in nv50_ram_calc()
103 nv_error(pfb, "invalid/missing timing entry " in nv50_ram_calc()
112 ret = ram_init(hwsq, nv_subdev(pfb)); in nv50_ram_calc()
133 ret = nv04_pll_calc(nv_subdev(pfb), &mpll, freq, in nv50_ram_calc()
203 nv50_ram_prog(struct nvkm_fb *pfb) in nv50_ram_prog() argument
205 struct nvkm_device *device = nv_device(pfb); in nv50_ram_prog()
206 struct nv50_ram *ram = (void *)pfb->ram; in nv50_ram_prog()
214 nv50_ram_tidy(struct nvkm_fb *pfb) in nv50_ram_tidy() argument
216 struct nv50_ram *ram = (void *)pfb->ram; in nv50_ram_tidy()
222 __nv50_ram_put(struct nvkm_fb *pfb, struct nvkm_mem *mem) in __nv50_ram_put() argument
230 nvkm_mm_free(&pfb->vram, &this); in __nv50_ram_put()
233 nvkm_mm_free(&pfb->tags, &mem->tag); in __nv50_ram_put()
237 nv50_ram_put(struct nvkm_fb *pfb, struct nvkm_mem **pmem) in nv50_ram_put() argument
245 mutex_lock(&pfb->base.mutex); in nv50_ram_put()
246 __nv50_ram_put(pfb, mem); in nv50_ram_put()
247 mutex_unlock(&pfb->base.mutex); in nv50_ram_put()
253 nv50_ram_get(struct nvkm_fb *pfb, u64 size, u32 align, u32 ncmin, in nv50_ram_get() argument
256 struct nvkm_mm *heap = &pfb->vram; in nv50_ram_get()
257 struct nvkm_mm *tags = &pfb->tags; in nv50_ram_get()
273 mutex_lock(&pfb->base.mutex); in nv50_ram_get()
298 mutex_unlock(&pfb->base.mutex); in nv50_ram_get()
299 pfb->ram->put(pfb, &mem); in nv50_ram_get()
306 mutex_unlock(&pfb->base.mutex); in nv50_ram_get()
315 nv50_fb_vram_rblock(struct nvkm_fb *pfb, struct nvkm_ram *ram) in nv50_fb_vram_rblock() argument
321 r0 = nv_rd32(pfb, 0x100200); in nv50_fb_vram_rblock()
322 r4 = nv_rd32(pfb, 0x100204); in nv50_fb_vram_rblock()
323 rt = nv_rd32(pfb, 0x100250); in nv50_fb_vram_rblock()
324 nv_debug(pfb, "memcfg 0x%08x 0x%08x 0x%08x 0x%08x\n", in nv50_fb_vram_rblock()
325 r0, r4, rt, nv_rd32(pfb, 0x001540)); in nv50_fb_vram_rblock()
338 nv_warn(pfb, "memory controller reports %d MiB VRAM\n", in nv50_fb_vram_rblock()
346 nv_debug(pfb, "rblock %d bytes\n", rblock_size); in nv50_fb_vram_rblock()
357 struct nvkm_fb *pfb = nvkm_fb(parent); in nv50_ram_create_() local
366 ram->size = nv_rd32(pfb, 0x10020c); in nv50_ram_create_()
369 ram->part_mask = (nv_rd32(pfb, 0x001540) & 0x00ff0000) >> 16; in nv50_ram_create_()
372 switch (nv_rd32(pfb, 0x100714) & 0x00000007) { in nv50_ram_create_()
387 ret = nvkm_mm_init(&pfb->vram, rsvd_head, (ram->size >> 12) - in nv50_ram_create_()
389 nv50_fb_vram_rblock(pfb, ram) >> 12); in nv50_ram_create_()
393 ram->ranks = (nv_rd32(pfb, 0x100200) & 0x4) ? 2 : 1; in nv50_ram_create_()
394 ram->tags = nv_rd32(pfb, 0x100320); in nv50_ram_create_()