From 8332b714b502ffbff712adc4baf0421ac3bb759c Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Sun, 1 Sep 2024 09:54:20 -0600 Subject: [PATCH] graphics_audio.py: Add AMD Navi patch --- CHANGELOG.md | 2 ++ opencore_legacy_patcher/efi_builder/graphics_audio.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba62c1938..67a3ddc43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ - Increase model range for S1X/S3X patching to include Haswell Macs and `MacPro6,1` - Helps avoid an issue where older machines with newer, unsupported SSDs would fail to boot - Only affects building EFI from another machine +- Resolve AMD Navi MXM GPU detection for modded iMac9,x-12,x + - Thanks @Ausdauersportler for the patch! - Increment Binaries: - PatcherSupportPkg 1.6.3 - release diff --git a/opencore_legacy_patcher/efi_builder/graphics_audio.py b/opencore_legacy_patcher/efi_builder/graphics_audio.py index dce88af68..35cf86b53 100644 --- a/opencore_legacy_patcher/efi_builder/graphics_audio.py +++ b/opencore_legacy_patcher/efi_builder/graphics_audio.py @@ -142,11 +142,15 @@ class BuildGraphicsAudio: iMac MXM dGPU Backlight DevicePath Detection """ - if not self.constants.custom_model and self.computer.dgpu and self.computer.dgpu.pci_path: + if not self.constants.custom_model: for i, device in enumerate(self.computer.gpus): logging.info(f"- Found dGPU ({i + 1}): {utilities.friendly_hex(device.vendor_id)}:{utilities.friendly_hex(device.device_id)}") self.config["#Revision"][f"Hardware-iMac-dGPU-{i + 1}"] = f"{utilities.friendly_hex(device.vendor_id)}:{utilities.friendly_hex(device.device_id)}" + # Work-around for AMD Navi MXM cards with PCIe bridge + if not self.computer.dgpu: + self.computer.dgpu=self.computer.gpus[i] + if device.pci_path != self.computer.dgpu.pci_path: logging.info("- device path and GFX0 Device path are different") self.gfx0_path = device.pci_path