void gm107_gr_init_bios(struct gf100_gr *gr) { static const struct { u32 ctrl; u32 data; } regs[] = { { 0x419ed8, 0x419ee0 }, { 0x419ad0, 0x419ad4 }, { 0x419ae0, 0x419ae4 }, { 0x419af0, 0x419af4 }, { 0x419af8, 0x419afc }, }; struct nvkm_device *device = gr->base.engine.subdev.device; struct nvkm_bios *bios = device->bios; struct nvbios_P0260E infoE; struct nvbios_P0260X infoX; int E = -1, X; u8 ver, hdr; while (nvbios_P0260Ep(bios, ++E, &ver, &hdr, &infoE)) { if (X = -1, E < ARRAY_SIZE(regs)) { nvkm_wr32(device, regs[E].ctrl, infoE.data); while (nvbios_P0260Xp(bios, ++X, &ver, &hdr, &infoX)) nvkm_wr32(device, regs[E].data, infoX.data); } } }
void gm107_gr_init_bios(struct gf100_gr_priv *priv) { static const struct { u32 ctrl; u32 data; } regs[] = { { 0x419ed8, 0x419ee0 }, { 0x419ad0, 0x419ad4 }, { 0x419ae0, 0x419ae4 }, { 0x419af0, 0x419af4 }, { 0x419af8, 0x419afc }, }; struct nvkm_bios *bios = nvkm_bios(priv); struct nvbios_P0260E infoE; struct nvbios_P0260X infoX; int E = -1, X; u8 ver, hdr; while (nvbios_P0260Ep(bios, ++E, &ver, &hdr, &infoE)) { if (X = -1, E < ARRAY_SIZE(regs)) { nv_wr32(priv, regs[E].ctrl, infoE.data); while (nvbios_P0260Xp(bios, ++X, &ver, &hdr, &infoX)) nv_wr32(priv, regs[E].data, infoX.data); } } }