Lines Matching refs:mxm
44 mxm_shadow_rom(struct nvkm_mxm *mxm, u8 version) in mxm_shadow_rom() argument
46 struct nvkm_device *device = mxm->subdev.device; in mxm_shadow_rom()
65 mxm->mxms = mxms; in mxm_shadow_rom()
66 size = mxms_headerlen(mxm) + mxms_structlen(mxm); in mxm_shadow_rom()
67 mxm->mxms = kmalloc(size, GFP_KERNEL); in mxm_shadow_rom()
69 if (mxm->mxms && in mxm_shadow_rom()
70 mxm_shadow_rom_fetch(bus, addr, 0, size, mxm->mxms)) in mxm_shadow_rom()
73 kfree(mxm->mxms); in mxm_shadow_rom()
74 mxm->mxms = NULL; in mxm_shadow_rom()
80 mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version) in mxm_shadow_dsm() argument
82 struct nvkm_subdev *subdev = &mxm->subdev; in mxm_shadow_dsm()
114 mxm->mxms = kmemdup(obj->buffer.pointer, in mxm_shadow_dsm()
122 return mxm->mxms != NULL; in mxm_shadow_dsm()
131 wmi_wmmx_mxmi(struct nvkm_mxm *mxm, u8 version) in wmi_wmmx_mxmi() argument
133 struct nvkm_subdev *subdev = &mxm->subdev; in wmi_wmmx_mxmi()
161 mxm_shadow_wmi(struct nvkm_mxm *mxm, u8 version) in mxm_shadow_wmi() argument
163 struct nvkm_subdev *subdev = &mxm->subdev; in mxm_shadow_wmi()
175 mxms_args[1] = wmi_wmmx_mxmi(mxm, 0x00); in mxm_shadow_wmi()
177 mxms_args[1] = wmi_wmmx_mxmi(mxm, version); in mxm_shadow_wmi()
189 mxm->mxms = kmemdup(obj->buffer.pointer, in mxm_shadow_wmi()
194 return mxm->mxms != NULL; in mxm_shadow_wmi()
213 mxm_shadow(struct nvkm_mxm *mxm, u8 version) in mxm_shadow() argument
217 nvkm_debug(&mxm->subdev, "checking %s\n", shadow->name); in mxm_shadow()
218 if (shadow->exec(mxm, version)) { in mxm_shadow()
219 if (mxms_valid(mxm)) in mxm_shadow()
221 kfree(mxm->mxms); in mxm_shadow()
222 mxm->mxms = NULL; in mxm_shadow()
237 struct nvkm_mxm *mxm; in nvkm_mxm_new_() local
241 if (!(mxm = *pmxm = kzalloc(sizeof(*mxm), GFP_KERNEL))) in nvkm_mxm_new_()
244 nvkm_subdev_ctor(&nvkm_mxm, device, type, inst, &mxm->subdev); in nvkm_mxm_new_()
248 nvkm_debug(&mxm->subdev, "no VBIOS data, nothing to do\n"); in nvkm_mxm_new_()
252 nvkm_info(&mxm->subdev, "BIOS version %d.%d\n", ver >> 4, ver & 0x0f); in nvkm_mxm_new_()
253 nvkm_debug(&mxm->subdev, "module flags: %02x\n", in nvkm_mxm_new_()
255 nvkm_debug(&mxm->subdev, "config flags: %02x\n", in nvkm_mxm_new_()
258 if (mxm_shadow(mxm, ver)) { in nvkm_mxm_new_()
259 nvkm_warn(&mxm->subdev, "failed to locate valid SIS\n"); in nvkm_mxm_new_()
272 nvkm_debug(&mxm->subdev, "MXMS Version %d.%d\n", in nvkm_mxm_new_()
273 mxms_version(mxm) >> 8, mxms_version(mxm) & 0xff); in nvkm_mxm_new_()
274 mxms_foreach(mxm, 0, NULL, NULL); in nvkm_mxm_new_()
277 mxm->action |= MXM_SANITISE_DCB; in nvkm_mxm_new_()