Lines Matching refs:mxm
30 mxms_data(struct nvkm_mxm *mxm) in mxms_data() argument
32 return mxm->mxms; in mxms_data()
37 mxms_version(struct nvkm_mxm *mxm) in mxms_version() argument
39 u8 *mxms = mxms_data(mxm); in mxms_version()
50 nvkm_debug(&mxm->subdev, "unknown version %d.%d\n", mxms[4], mxms[5]); in mxms_version()
55 mxms_headerlen(struct nvkm_mxm *mxm) in mxms_headerlen() argument
61 mxms_structlen(struct nvkm_mxm *mxm) in mxms_structlen() argument
63 return *(u16 *)&mxms_data(mxm)[6]; in mxms_structlen()
67 mxms_checksum(struct nvkm_mxm *mxm) in mxms_checksum() argument
69 u16 size = mxms_headerlen(mxm) + mxms_structlen(mxm); in mxms_checksum()
70 u8 *mxms = mxms_data(mxm), sum = 0; in mxms_checksum()
74 nvkm_debug(&mxm->subdev, "checksum invalid\n"); in mxms_checksum()
81 mxms_valid(struct nvkm_mxm *mxm) in mxms_valid() argument
83 u8 *mxms = mxms_data(mxm); in mxms_valid()
85 nvkm_debug(&mxm->subdev, "signature invalid\n"); in mxms_valid()
89 if (!mxms_version(mxm) || !mxms_checksum(mxm)) in mxms_valid()
96 mxms_foreach(struct nvkm_mxm *mxm, u8 types, in mxms_foreach() argument
99 struct nvkm_subdev *subdev = &mxm->subdev; in mxms_foreach()
100 u8 *mxms = mxms_data(mxm); in mxms_foreach()
101 u8 *desc = mxms + mxms_headerlen(mxm); in mxms_foreach()
102 u8 *fini = desc + mxms_structlen(mxm) - 1; in mxms_foreach()
111 if (mxms_version(mxm) >= 0x0300) in mxms_foreach()
130 if (mxms_version(mxm) >= 0x0300) { in mxms_foreach()
148 if (mxm->subdev.debug >= NV_DBG_DEBUG && (exec == NULL)) { in mxms_foreach()
170 if (!exec(mxm, desc, info)) in mxms_foreach()
181 mxms_output_device(struct nvkm_mxm *mxm, u8 *pdata, struct mxms_odev *desc) in mxms_output_device() argument
184 if (mxms_version(mxm) >= 0x0300) in mxms_output_device()