Lines Matching refs:mthd

39 shadow_fetch(struct nvkm_bios *bios, struct shadow *mthd, u32 upto)  in shadow_fetch()  argument
43 void *data = mthd->data; in shadow_fetch()
45 u32 read = mthd->func->read(data, start, limit - start, bios); in shadow_fetch()
52 shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd) in shadow_image() argument
58 if (mthd->func->no_pcir) { in shadow_image()
61 image.size = mthd->func->size(mthd->data); in shadow_image()
64 if (!shadow_fetch(bios, mthd, offset + 0x1000)) { in shadow_image()
78 if (!shadow_fetch(bios, mthd, image.size)) { in shadow_image()
85 if (!mthd->func->ignore_checksum && in shadow_image()
89 if (mthd->func->rw) in shadow_image()
102 score += shadow_image(bios, idx + 1, offset + image.size, mthd); in shadow_image()
107 shadow_method(struct nvkm_bios *bios, struct shadow *mthd, const char *name) in shadow_method() argument
109 const struct nvbios_source *func = mthd->func; in shadow_method()
114 mthd->data = func->init(bios, name); in shadow_method()
115 if (IS_ERR(mthd->data)) { in shadow_method()
116 mthd->data = NULL; in shadow_method()
120 mthd->score = shadow_image(bios, 0, 0, mthd); in shadow_method()
122 func->fini(mthd->data); in shadow_method()
123 nvkm_debug(subdev, "scored %d\n", mthd->score); in shadow_method()
124 mthd->data = bios->data; in shadow_method()
125 mthd->size = bios->size; in shadow_method()
129 return mthd->score; in shadow_method()
177 }, *mthd, *best = NULL; in nvbios_shadow() local
187 for (mthd = mthds; mthd->func; mthd++) { in nvbios_shadow()
188 if (mthd->func->name && in nvbios_shadow()
189 !strcasecmp(source, mthd->func->name)) { in nvbios_shadow()
190 best = mthd; in nvbios_shadow()
191 if (shadow_method(bios, mthd, NULL)) in nvbios_shadow()
197 if (!best && (best = mthd)) { in nvbios_shadow()
198 mthd->func = &shadow_fw; in nvbios_shadow()
199 shadow_method(bios, mthd, source); in nvbios_shadow()
200 mthd->func = NULL; in nvbios_shadow()
212 for (mthd = mthds, best = mthd; mthd->func; mthd++) { in nvbios_shadow()
213 if (!mthd->skip || best->score < mthd->skip) { in nvbios_shadow()
214 if (shadow_method(bios, mthd, NULL)) { in nvbios_shadow()
215 if (mthd->score > best->score) in nvbios_shadow()
216 best = mthd; in nvbios_shadow()
223 for (mthd = mthds; mthd->func; mthd++) { in nvbios_shadow()
224 if (mthd != best) in nvbios_shadow()
225 kfree(mthd->data); in nvbios_shadow()