Skip to content

Commit

Permalink
graphics_audio.py: Add AMD Navi patch
Browse files Browse the repository at this point in the history
  • Loading branch information
khronokernel authored Sep 1, 2024
1 parent 4add945 commit 8332b71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 5 additions & 1 deletion opencore_legacy_patcher/efi_builder/graphics_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,15 @@ def _backlight_path_detection(self) -> None:
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
Expand Down

0 comments on commit 8332b71

Please sign in to comment.