[v0.11] Adding uarch backend for intel iGPUs

This commit is contained in:
Dr-Noob
2021-11-26 12:52:45 +01:00
parent ce004725ad
commit 8740337145
16 changed files with 176 additions and 48 deletions

View File

@@ -3,6 +3,7 @@
#include "intel.hpp"
#include "uarch.hpp"
#include "chips.hpp"
#include "../common/pci.hpp"
#include "../common/global.hpp"
@@ -11,8 +12,11 @@ struct gpu_info* get_gpu_info_intel() {
const char* name = "UHD Graphics XXX";
gpu->vendor = GPU_VENDOR_INTEL;
gpu->name = (char *) emalloc(sizeof(char) * (strlen(name) + 1));
strcpy(gpu->name, name);
struct pci_dev *devices = get_pci_devices_from_pciutils();
gpu->pci = get_pci_from_pciutils(devices, PCI_VENDOR_ID_INTEL);
gpu->arch = get_uarch_from_pci(gpu->pci);
gpu->name = get_name_from_uarch(gpu->arch);
return gpu;
}