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()
151 struct nvkm_instobj *iobj, *itmp; in nvkm_instmem_boot() local
153 list_for_each_entry_safe(iobj, itmp, &imem->list, head) { in nvkm_instmem_boot()
154 list_move_tail(&iobj->head, &imem->boot); in nvkm_instmem_boot()
163 struct nvkm_instobj *iobj; in nvkm_instmem_fini() local
166 list_for_each_entry(iobj, &imem->list, head) { in nvkm_instmem_fini()
167 int ret = nvkm_instobj_save(iobj); in nvkm_instmem_fini()
174 list_for_each_entry(iobj, &imem->boot, head) { in nvkm_instmem_fini()
175 int ret = nvkm_instobj_save(iobj); in nvkm_instmem_fini()
191 struct nvkm_instobj *iobj; in nvkm_instmem_init() local
193 list_for_each_entry(iobj, &imem->boot, head) { in nvkm_instmem_init()
194 if (iobj->suspend) in nvkm_instmem_init()
195 nvkm_instobj_load(iobj); in nvkm_instmem_init()
200 list_for_each_entry(iobj, &imem->list, head) { in nvkm_instmem_init()
201 if (iobj->suspend) in nvkm_instmem_init()
202 nvkm_instobj_load(iobj); in nvkm_instmem_init()