Add iMac10,1 default dGPU pathing

This commit is contained in:
Mykola Grymalyuk
2021-05-12 17:48:47 -06:00
parent d42d2d09e9
commit 04019798e9
2 changed files with 6 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
## 0.1.5
- Fix crashing when Wireless module not present
- Add iMac10,1 default dGPU pathing
## 0.1.4
- Fix Device Path formatting on 2012+ iMacs

View File

@@ -352,6 +352,8 @@ class BuildOpenCore:
print("- Failed to find GFX0 Device path, falling back on known logic")
if self.model in ["iMac11,1", "iMac11,3"]:
self.gfx0_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
elif self.model == "iMac10,1":
self.gfx0_path = "PciRoot(0x0)/Pci(0xc,0x0)/Pci(0x0,0x0)"
else:
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
else:
@@ -360,6 +362,8 @@ class BuildOpenCore:
else:
if self.model in ["iMac11,1", "iMac11,3"]:
self.gfx0_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
elif self.model == "iMac10,1":
self.gfx0_path = "PciRoot(0x0)/Pci(0xc,0x0)/Pci(0x0,0x0)"
else:
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
print(f"- Using known GFX0 path: {self.gfx0_path}")
@@ -367,7 +371,7 @@ class BuildOpenCore:
def nvidia_patch(self, backlight_path):
self.constants.custom_mxm_gpu = True
if self.model in ["iMac11,1", "iMac11,2", "iMac11,3"]:
if self.model in ["iMac11,1", "iMac11,2", "iMac11,3", "iMac10,1"]:
print("- Adding Nvidia Brightness Control and DRM patches")
self.config["DeviceProperties"]["Add"][backlight_path] = {"@0,backlight-control": binascii.unhexlify("01000000"), "@0,built-in": binascii.unhexlify("01000000"), "shikigva": 256, "agdpmod": "vit9696"}
if self.constants.custom_model and self.model == "iMac11,2":