From 2611ceee2185c3303c116dbc20c82fda7c486554 Mon Sep 17 00:00:00 2001 From: Zormeister <57213163+Zormeister@users.noreply.github.com> Date: Sun, 27 Oct 2024 08:02:43 +1100 Subject: [PATCH 1/2] Update DeviceID based AMD detection --- Lilu/Headers/kern_devinfo.hpp | 7 ++++++- Lilu/Sources/kern_devinfo.cpp | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Lilu/Headers/kern_devinfo.hpp b/Lilu/Headers/kern_devinfo.hpp index f2f74d08..63d2838d 100644 --- a/Lilu/Headers/kern_devinfo.hpp +++ b/Lilu/Headers/kern_devinfo.hpp @@ -263,8 +263,13 @@ class DeviceInfo { */ static constexpr uint32_t GenericAMDKbMlCzStnWr = 0x9800; + /** + * Van Gogh's other Device ID, specifically: 0x1435 rev 0xAE. + */ + static constexpr uint32_t GenericAMDVanGogh2 = 0x1400; + /** - * Raven/Raven2, Picasso, Barcelo, Phoenix & Phoenix 2 (?) + * Raven/Raven2, Picasso, Barcelo, Phoenix, Phoenix 2 (possibly Hawk Point) & Strix (0x150E) */ static constexpr uint32_t GenericAMDRvPcBcPhn = 0x1500; diff --git a/Lilu/Sources/kern_devinfo.cpp b/Lilu/Sources/kern_devinfo.cpp index cce0f2eb..f025cbc8 100644 --- a/Lilu/Sources/kern_devinfo.cpp +++ b/Lilu/Sources/kern_devinfo.cpp @@ -190,6 +190,7 @@ bool DeviceInfo::checkForAndSetAMDiGPU(IORegistryEntry *obj) { dev &= 0xFF00; switch (dev) { case GenericAMDKvGr: + case GenericAMDVanGogh2: case GenericAMDRvPcBcPhn: case GenericAMDRnCznLcVghRmbRph: case GenericAMDPhoenix2: @@ -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; } From 7e6f3da20c0f92368477372e5d8d877eab172258 Mon Sep 17 00:00:00 2001 From: Zormeister <57213163+Zormeister@users.noreply.github.com> Date: Sun, 27 Oct 2024 08:11:21 +1100 Subject: [PATCH 2/2] fix formatting --- Lilu/Headers/kern_devinfo.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lilu/Headers/kern_devinfo.hpp b/Lilu/Headers/kern_devinfo.hpp index 63d2838d..8ce90aac 100644 --- a/Lilu/Headers/kern_devinfo.hpp +++ b/Lilu/Headers/kern_devinfo.hpp @@ -263,7 +263,7 @@ class DeviceInfo { */ static constexpr uint32_t GenericAMDKbMlCzStnWr = 0x9800; - /** + /** * Van Gogh's other Device ID, specifically: 0x1435 rev 0xAE. */ static constexpr uint32_t GenericAMDVanGogh2 = 0x1400;