Skip to content

Commit

Permalink
Revert "Add AMD IGPU detection via device-id (#97)"
Browse files Browse the repository at this point in the history
This reverts commit 8ae3167.
The change breaks GCN 5 IGPU detection at least.
references acidanthera/bugtracker#2424
  • Loading branch information
vit9696 committed Aug 27, 2024
1 parent 1bf2bcc commit cedfe8a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 44 deletions.
1 change: 0 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Lilu Changelog
==============
#### v1.6.9
- Fixed loading on macOS 10.10 and older due to a MacKernelSDK regression
- Added AMD IGPU detection via device-id, thanks @Zormeister

#### v1.6.8
- Allow loading on macOS 15 without `-lilubetaall`
Expand Down
35 changes: 0 additions & 35 deletions Lilu/Headers/kern_devinfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,41 +246,6 @@ class DeviceInfo {
static constexpr uint32_t ConnectorLessCoffeeLakePlatformId5 {0x9BC50003};
static constexpr uint32_t ConnectorLessCoffeeLakePlatformId6 {0x9BC40003};

/**
* Kaveri, and also catches the new Granite Ridge rDNA 2 iGPU.
*/
static constexpr uint32_t GenericAMDKvGr = 0x1300;

/**
* Kabini, Mullins, Carrizo, Stoney Ridge, Wrestler.
*/
static constexpr uint32_t GenericAMDKbMlCzStnWr = 0x9800;

/**
* Raven/Raven2, Picasso, Barcelo, Phoenix & Phoenix 2 (?)
*/
static constexpr uint32_t GenericAMDRvPcBcPhn = 0x1500;

/**
* Renoir, Cezanne, Lucienne, Van Gogh, Rembrandt, Raphael.
*/
static constexpr uint32_t GenericAMDRnCznLcVghRmbRph = 0x1600;

/**
* Trinity
*/
static constexpr uint32_t GenericAMDTrinity = 0x9900;

/**
* Sumo & Sumo2?
*/
static constexpr uint32_t GenericAMDSumo = 0x9600;

/**
* Phoenix.
*/
static constexpr uint32_t GenericAMDPhoenix2 = 0x1900;

public:
/**
* Vesa framebuffer identifier
Expand Down
12 changes: 4 additions & 8 deletions Lilu/Sources/kern_devinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,6 @@ void DeviceInfo::grabDevicesFromPciRoot(IORegistryEntry *pciRoot) {
DBGLOG("dev", "found IGPU device %s", safeString(name));
videoBuiltin = obj;
requestedExternalSwitchOff |= videoBuiltin->getProperty(RequestedExternalSwitchOffName) != nullptr;
} else if (vendor == WIOKit::VendorID::ATIAMD && (code == WIOKit::ClassCode::DisplayController || code == WIOKit::ClassCode::VGAController)) {
uint32_t dev = 0;
WIOKit::getOSDataValue(obj, "device-id", dev);
dev = (dev & 0xFF00);
if ((dev == GenericAMDRnCznLcVghRmbRph || dev == GenericAMDRvPcBcPhn) || (dev == GenericAMDKbMlCzStnWr || dev == GenericAMDKvGr) || (dev == GenericAMDTrinity || dev == GenericAMDSumo) || dev == GenericAMDPhoenix2) {
DBGLOG("dev", "found IGPU device %s", safeString(name));
videoBuiltin = obj;
}
} else if (code == WIOKit::ClassCode::HDADevice || code == WIOKit::ClassCode::HDAMmDevice) {
if (vendor == WIOKit::VendorID::Intel && name && (!strcmp(name, "HDAU") || !strcmp(name, "B0D3"))) {
DBGLOG("dev", "found HDAU device %s", safeString(name));
Expand Down Expand Up @@ -280,6 +272,10 @@ void DeviceInfo::grabDevicesFromPciRoot(IORegistryEntry *pciRoot) {
// To distinguish the devices we use audio card presence as a marker.
DBGLOG("dev", "marking audio device as HDEF at %s", safeString(v.audio->getName()));
audioBuiltinAnalog = v.audio;

if (v.video && v.vendor == WIOKit::VendorID::ATIAMD) {
videoBuiltin = v.video;
}
}
}
}
Expand Down

0 comments on commit cedfe8a

Please sign in to comment.