/* PRAMIN always potentially available prior to nv50 */ if (device->card_type < NV_50) return NULL;
/* we can't get the bios image pointer without PDISP */ if (device->card_type >= GA100)
addr = device->chipset == 0x170; /*XXX: find the fuse reg for this */ else if (device->card_type >= GM100)
addr = nvkm_rd32(device, 0x021c04); else if (device->card_type >= NV_C0)
addr = nvkm_rd32(device, 0x022500); if (addr & 0x00000001) {
nvkm_debug(subdev, "... display disabled\n"); return ERR_PTR(-ENODEV);
}
/* check that the window is enabled and in vram, particularly *importantaswedon'twanttobetouchingvramonan *uninitialisedboard
*/ if (device->card_type >= GV100)
addr = nvkm_rd32(device, 0x625f04); else
addr = nvkm_rd32(device, 0x619f04); if (!(addr & 0x00000008)) {
nvkm_debug(subdev, "... not enabled\n"); return ERR_PTR(-ENODEV);
} if ( (addr & 0x00000003) != 1) {
nvkm_debug(subdev, "... not in vram\n"); return ERR_PTR(-ENODEV);
}
/* some alternate method inherited from xf86-video-nv... */
addr = (addr & 0xffffff00) << 8; if (!addr) {
addr = (u64)nvkm_rd32(device, 0x001700) << 16;
addr += 0xf0000;
}
/* modify bar0 PRAMIN window to cover the bios image */ if (!(priv = kmalloc(sizeof(*priv), GFP_KERNEL))) {
nvkm_error(subdev, "... out of memory\n"); return ERR_PTR(-ENOMEM);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.