Skip to content

Commit

Permalink
Update DeviceID based AMD iGPU detection (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zormeister authored Nov 24, 2024
1 parent 42326bd commit 78877e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Lilu/Headers/kern_devinfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,12 @@ class DeviceInfo {
static constexpr uint32_t GenericAMDKbMlCzStnWr = 0x9800;

/**
* Raven/Raven2, Picasso, Barcelo, Phoenix & Phoenix 2 (?)
* Van Gogh's other Device ID, specifically: 0x1435 rev 0xAE.
*/
static constexpr uint32_t GenericAMDVanGogh2 = 0x1400;

/**
* Raven/Raven2, Picasso, Barcelo, Phoenix, Phoenix 2 (possibly Hawk Point) & Strix (0x150E)
*/
static constexpr uint32_t GenericAMDRvPcBcPhn = 0x1500;

Expand Down
5 changes: 3 additions & 2 deletions Lilu/Sources/kern_devinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ bool DeviceInfo::checkForAndSetAMDiGPU(IORegistryEntry *obj) {
dev &= 0xFF00;
switch (dev) {
case GenericAMDKvGr:
case GenericAMDVanGogh2:
case GenericAMDRvPcBcPhn:
case GenericAMDRnCznLcVghRmbRph:
case GenericAMDPhoenix2:
Expand Down Expand Up @@ -270,8 +271,8 @@ void DeviceInfo::grabDevicesFromPciRoot(IORegistryEntry *pciRoot) {
pcicode == WIOKit::ClassCode::XGAController) {
if (pcivendor == WIOKit::VendorID::ATIAMD) {
// The iGPU can live in places other than the root bridge.
// This can be seen in Ryzen Mobile.
// This may be why the older iGPUs had issues, as the device seemingly lives under the root bridge on those platforms.
// This can be seen in Ryzen Mobile and newer.
// This is why the older iGPUs had issues, as the device lives under the root bridge on those platforms.
if (checkForAndSetAMDiGPU(pciobj)) {
continue;
}
Expand Down

0 comments on commit 78877e9

Please sign in to comment.