Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DeviceID based AMD iGPU detection #99

Merged
merged 2 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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