Lines Matching refs:fbsr

44 struct fbsr {  struct
119 fbsr_send(struct fbsr *fbsr, struct fbsr_item *item) in fbsr_send() argument
122 struct nvkm_gsp *gsp = fbsr->client.gsp; in fbsr_send()
126 ret = fbsr_memlist(&fbsr->device, fbsr->hmemory, NVKM_MEM_TARGET_VRAM, in fbsr_send()
140 ctrl->hClient = fbsr->client.object.handle; in fbsr_send()
141 ctrl->hVidMem = fbsr->hmemory++; in fbsr_send()
143 ctrl->sysOffset = fbsr->sys_offset; in fbsr_send()
152 fbsr->sys_offset += item->size; in fbsr_send()
157 fbsr_init(struct fbsr *fbsr, struct sg_table *sgt, u64 items_size) in fbsr_init() argument
160 struct nvkm_gsp *gsp = fbsr->client.gsp; in fbsr_init()
164 ret = fbsr_memlist(&fbsr->device, fbsr->hmemory, NVKM_MEM_TARGET_HOST, in fbsr_init()
165 0, fbsr->size, sgt, &memlist); in fbsr_init()
175 ctrl->numRegions = fbsr->regions; in fbsr_init()
176 ctrl->hClient = fbsr->client.object.handle; in fbsr_init()
177 ctrl->hSysMem = fbsr->hmemory++; in fbsr_init()
189 fbsr_vram(struct fbsr *fbsr, const char *type, u64 addr, u64 size) in fbsr_vram() argument
199 list_add_tail(&item->head, &fbsr->items); in fbsr_vram()
204 fbsr_inst(struct fbsr *fbsr, const char *type, struct nvkm_memory *memory) in fbsr_inst() argument
206 return fbsr_vram(fbsr, type, nvkm_memory_addr(memory), nvkm_memory_size(memory)); in fbsr_inst()
214 nvkm_gsp_sg_free(imem->subdev.device, &imem->rm.fbsr); in r535_instmem_resume()
226 struct fbsr fbsr = {}; in r535_instmem_suspend() local
231 INIT_LIST_HEAD(&fbsr.items); in r535_instmem_suspend()
232 fbsr.hmemory = 0xcaf00003; in r535_instmem_suspend()
237 if (!fbsr_inst(&fbsr, "inst", &iobj->memory)) in r535_instmem_suspend()
243 if (!fbsr_inst(&fbsr, "boot", &iobj->memory)) in r535_instmem_suspend()
247 if (!fbsr_vram(&fbsr, "gsp-non-wpr", gsp->fb.heap.addr, gsp->fb.heap.size)) in r535_instmem_suspend()
251 list_for_each_entry(item, &fbsr.items, head) { in r535_instmem_suspend()
254 fbsr.size += item->size; in r535_instmem_suspend()
255 fbsr.regions++; in r535_instmem_suspend()
258 items_size = fbsr.size; in r535_instmem_suspend()
259 nvkm_debug(subdev, "fbsr: %d regions (0x%llx bytes)\n", fbsr.regions, items_size); in r535_instmem_suspend()
261 fbsr.size += gsp->fb.rsvd_size; in r535_instmem_suspend()
262 fbsr.size += gsp->fb.bios.vga_workspace.size; in r535_instmem_suspend()
263 nvkm_debug(subdev, "fbsr: size: 0x%llx bytes\n", fbsr.size); in r535_instmem_suspend()
265 ret = nvkm_gsp_sg(gsp->subdev.device, fbsr.size, &imem->rm.fbsr); in r535_instmem_suspend()
270 ret = nvkm_gsp_client_device_ctor(gsp, &fbsr.client, &fbsr.device); in r535_instmem_suspend()
274 ret = fbsr_init(&fbsr, &imem->rm.fbsr, items_size); in r535_instmem_suspend()
279 list_for_each_entry(item, &fbsr.items, head) { in r535_instmem_suspend()
280 ret = fbsr_send(&fbsr, item); in r535_instmem_suspend()
290 nvkm_gsp_sg_free(device, &imem->rm.fbsr); in r535_instmem_suspend()
292 list_for_each_entry_safe(item, temp, &fbsr.items, head) { in r535_instmem_suspend()
297 nvkm_gsp_device_dtor(&fbsr.device); in r535_instmem_suspend()
298 nvkm_gsp_client_dtor(&fbsr.client); in r535_instmem_suspend()