Lines Matching refs:hsfw

30 nvkm_acr_hsfw_del(struct nvkm_acr_hsfw *hsfw)  in nvkm_acr_hsfw_del()  argument
32 list_del(&hsfw->head); in nvkm_acr_hsfw_del()
33 kfree(hsfw->imem); in nvkm_acr_hsfw_del()
34 kfree(hsfw->image); in nvkm_acr_hsfw_del()
35 kfree(hsfw->sig.prod.data); in nvkm_acr_hsfw_del()
36 kfree(hsfw->sig.dbg.data); in nvkm_acr_hsfw_del()
37 kfree(hsfw); in nvkm_acr_hsfw_del()
43 struct nvkm_acr_hsfw *hsfw, *hsft; in nvkm_acr_hsfw_del_all() local
44 list_for_each_entry_safe(hsfw, hsft, &acr->hsfw, head) { in nvkm_acr_hsfw_del_all()
45 nvkm_acr_hsfw_del(hsfw); in nvkm_acr_hsfw_del_all()
51 struct nvkm_acr_hsfw *hsfw) in nvkm_acr_hsfw_load_image() argument
88 if (!(hsfw->image = kmalloc(hdr->data_size, GFP_KERNEL))) { in nvkm_acr_hsfw_load_image()
93 memcpy(hsfw->image, fw->data + hdr->data_offset, hdr->data_size); in nvkm_acr_hsfw_load_image()
94 hsfw->image_size = hdr->data_size; in nvkm_acr_hsfw_load_image()
95 hsfw->non_sec_addr = lhdr->non_sec_code_off; in nvkm_acr_hsfw_load_image()
96 hsfw->non_sec_size = lhdr->non_sec_code_size; in nvkm_acr_hsfw_load_image()
97 hsfw->sec_addr = lhdr->apps[0]; in nvkm_acr_hsfw_load_image()
98 hsfw->sec_size = lhdr->apps[lhdr->num_apps]; in nvkm_acr_hsfw_load_image()
99 hsfw->data_addr = lhdr->data_dma_base; in nvkm_acr_hsfw_load_image()
100 hsfw->data_size = lhdr->data_size; in nvkm_acr_hsfw_load_image()
102 hsfw->sig.prod.size = fwhdr->sig_prod_size; in nvkm_acr_hsfw_load_image()
103 hsfw->sig.prod.data = kmemdup(fw->data + fwhdr->sig_prod_offset + sig, in nvkm_acr_hsfw_load_image()
104 hsfw->sig.prod.size, GFP_KERNEL); in nvkm_acr_hsfw_load_image()
105 if (!hsfw->sig.prod.data) { in nvkm_acr_hsfw_load_image()
110 hsfw->sig.dbg.size = fwhdr->sig_dbg_size; in nvkm_acr_hsfw_load_image()
111 hsfw->sig.dbg.data = kmemdup(fw->data + fwhdr->sig_dbg_offset + sig, in nvkm_acr_hsfw_load_image()
112 hsfw->sig.dbg.size, GFP_KERNEL); in nvkm_acr_hsfw_load_image()
113 if (!hsfw->sig.dbg.data) { in nvkm_acr_hsfw_load_image()
118 hsfw->sig.patch_loc = loc; in nvkm_acr_hsfw_load_image()
126 struct nvkm_acr_hsfw *hsfw) in nvkm_acr_hsfw_load_bl() argument
143 hsfw->imem_size = desc->code_size; in nvkm_acr_hsfw_load_bl()
144 hsfw->imem_tag = desc->start_tag; in nvkm_acr_hsfw_load_bl()
145 hsfw->imem = kmalloc(desc->code_size, GFP_KERNEL); in nvkm_acr_hsfw_load_bl()
146 memcpy(hsfw->imem, data + desc->code_off, desc->code_size); in nvkm_acr_hsfw_load_bl()
157 struct nvkm_acr_hsfw *hsfw; in nvkm_acr_hsfw_load() local
160 if (!(hsfw = kzalloc(sizeof(*hsfw), GFP_KERNEL))) in nvkm_acr_hsfw_load()
163 hsfw->func = fwif->func; in nvkm_acr_hsfw_load()
164 hsfw->name = name; in nvkm_acr_hsfw_load()
165 list_add_tail(&hsfw->head, &acr->hsfw); in nvkm_acr_hsfw_load()
167 ret = nvkm_acr_hsfw_load_bl(acr, bl, version, hsfw); in nvkm_acr_hsfw_load()
171 ret = nvkm_acr_hsfw_load_image(acr, fw, version, hsfw); in nvkm_acr_hsfw_load()
174 nvkm_acr_hsfw_del(hsfw); in nvkm_acr_hsfw_load()