void init_igd(const sysinfo_t *const sysinfo) { const pci_devfn_t mch_dev = PCI_DEV(0, 0, 0); const u8 capid = pci_read_config8(mch_dev, D0F0_CAPID0 + 4); if (!sysinfo->enable_igd || (capid & (1 << (33 - 32)))) disable_igd(sysinfo); else enable_igd(sysinfo, !sysinfo->enable_peg); }
void init_igd(const sysinfo_t *const sysinfo, const int no_igd, const int no_peg) { const device_t mch_dev = PCI_DEV(0, 0, 0); const u8 capid = pci_read_config8(mch_dev, D0F0_CAPID0 + 4); if (no_igd || (capid & (1 << (33 - 32)))) disable_igd(sysinfo); else enable_igd(sysinfo, no_peg); }