Lines Matching refs:iobj
32 nvkm_instobj_load(struct nvkm_instobj *iobj) in nvkm_instobj_load() argument
34 struct nvkm_memory *memory = &iobj->memory; in nvkm_instobj_load()
41 nvkm_wo32(memory, i, iobj->suspend[i / 4]); in nvkm_instobj_load()
43 memcpy_toio(map, iobj->suspend, size); in nvkm_instobj_load()
47 kvfree(iobj->suspend); in nvkm_instobj_load()
48 iobj->suspend = NULL; in nvkm_instobj_load()
52 nvkm_instobj_save(struct nvkm_instobj *iobj) in nvkm_instobj_save() argument
54 struct nvkm_memory *memory = &iobj->memory; in nvkm_instobj_save()
59 iobj->suspend = kvmalloc(size, GFP_KERNEL); in nvkm_instobj_save()
60 if (!iobj->suspend) in nvkm_instobj_save()
65 iobj->suspend[i / 4] = nvkm_ro32(memory, i); in nvkm_instobj_save()
67 memcpy_fromio(iobj->suspend, map, size); in nvkm_instobj_save()
74 nvkm_instobj_dtor(struct nvkm_instmem *imem, struct nvkm_instobj *iobj) in nvkm_instobj_dtor() argument
77 list_del(&iobj->head); in nvkm_instobj_dtor()
83 struct nvkm_instmem *imem, struct nvkm_instobj *iobj) in nvkm_instobj_ctor() argument
85 nvkm_memory_ctor(func, &iobj->memory); in nvkm_instobj_ctor()
86 iobj->suspend = NULL; in nvkm_instobj_ctor()
88 list_add_tail(&iobj->head, &imem->list); in nvkm_instobj_ctor()
163 struct nvkm_instobj *iobj, *itmp; in nvkm_instmem_boot() local
165 list_for_each_entry_safe(iobj, itmp, &imem->list, head) { in nvkm_instmem_boot()
166 list_move_tail(&iobj->head, &imem->boot); in nvkm_instmem_boot()
175 struct nvkm_instobj *iobj; in nvkm_instmem_fini() local
178 list_for_each_entry(iobj, &imem->list, head) { in nvkm_instmem_fini()
179 int ret = nvkm_instobj_save(iobj); in nvkm_instmem_fini()
186 list_for_each_entry(iobj, &imem->boot, head) { in nvkm_instmem_fini()
187 int ret = nvkm_instobj_save(iobj); in nvkm_instmem_fini()
203 struct nvkm_instobj *iobj; in nvkm_instmem_init() local
205 list_for_each_entry(iobj, &imem->boot, head) { in nvkm_instmem_init()
206 if (iobj->suspend) in nvkm_instmem_init()
207 nvkm_instobj_load(iobj); in nvkm_instmem_init()
212 list_for_each_entry(iobj, &imem->list, head) { in nvkm_instmem_init()
213 if (iobj->suspend) in nvkm_instmem_init()
214 nvkm_instobj_load(iobj); in nvkm_instmem_init()