Merge pull request #1035 from Ausdauersportler/main

iMac9,1 MXM3 AMD GCN support
This commit is contained in:
Mykola Grymalyuk
2023-03-28 14:16:37 -06:00
committed by GitHub
5 changed files with 25 additions and 14 deletions

View File

@@ -1872,8 +1872,10 @@ smbios_dictionary = {
"Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046,
"Ethernet Chipset": "Nvidia",
"nForce Chipset": True,
"Socketed GPUs": "MXM",
"Stock GPUs": [
device_probe.NVIDIA.Archs.Tesla,
device_probe.AMD.Archs.TeraScale_1,
],
"Stock Storage": [
"SATA 3.5",
@@ -1943,7 +1945,7 @@ smbios_dictionary = {
"nForce Chipset": True,
"Socketed GPUs": "MXM",
"Stock GPUs": [
device_probe.NVIDIA.Archs.Tesla,
device_probe.AMD.Archs.TeraScale_1,
],
"Stock Storage": [
"SATA 3.5",
@@ -1961,7 +1963,7 @@ smbios_dictionary = {
"nForce Chipset": True,
"Socketed GPUs": "MXM",
"Stock GPUs": [
device_probe.NVIDIA.Archs.Tesla,
device_probe.AMD.Archs.TeraScale_1,
],
"Stock Storage": [
"SATA 3.5",
@@ -1979,7 +1981,7 @@ smbios_dictionary = {
"nForce Chipset": True,
"Socketed GPUs": "MXM",
"Stock GPUs": [
device_probe.NVIDIA.Archs.Tesla,
device_probe.AMD.Archs.TeraScale_1,
],
"Stock Storage": [
"SATA 3.5",
@@ -3013,4 +3015,4 @@ smbios_dictionary = {
"Stock GPUs": [],
"Stock Storage": [],
},
}
}

Binary file not shown.

View File

@@ -138,7 +138,7 @@ class build_graphics_audio:
logging.info("- 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":
elif self.model in ["iMac9,1", "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)"
@@ -193,6 +193,10 @@ class build_graphics_audio:
# Ensure WEG is enabled as we need if for Backlight patching
support.build_support(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_navi_version, self.constants.whatevergreen_navi_path)
if self.model == "iMac9,1":
logging.info("- Adding iMac9,1 Brightness Control and DRM patches")
support.build_support(self.model, self.constants, self.config).enable_kext("BacklightInjector.kext", self.constants.backlight_injectorA_version, self.constants.backlight_injectorA_path)
if not self.constants.custom_model:
if self.computer.dgpu.device_id == 0x7340:
logging.info(f"- Adding AMD RX5500XT vBIOS injection")
@@ -217,7 +221,7 @@ class build_graphics_audio:
"name": binascii.unhexlify("23646973706C6179"),
"class-code": binascii.unhexlify("FFFFFFFF"),
}
elif self.model == "iMac10,1":
elif self.model in ["iMac9,1", "iMac10,1"]:
support.build_support(self.model, self.constants, self.config).enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path)
if self.computer and self.computer.dgpu:
if self.computer.dgpu.arch == device_probe.AMD.Archs.Legacy_GCN_7000:

View File

@@ -75,12 +75,13 @@ class Constants:
## Dortania
## https://github.com/dortania
self.backlight_injector_version: str = "1.1.0" # BacklightInjector
self.smcspoof_version: str = "1.0.0" # SMC-Spoof
self.mce_version: str = "1.0.0" # AppleMCEReporterDisabler
self.btspoof_version: str = "1.0.0" # Bluetooth-Spoof
self.aspp_override_version: str = "1.0.1" # ACPI_SMC_PlatformPlugin Override
self.rsrhelper_version: str = "1.0.0" # RSRHelper
self.backlight_injector_version: str = "1.1.0" # BacklightInjector
self.backlight_injectorA_version: str = "1.0.0" # BacklightInjector (iMac9,1)
self.smcspoof_version: str = "1.0.0" # SMC-Spoof
self.mce_version: str = "1.0.0" # AppleMCEReporterDisabler
self.btspoof_version: str = "1.0.0" # Bluetooth-Spoof
self.aspp_override_version: str = "1.0.1" # ACPI_SMC_PlatformPlugin Override
self.rsrhelper_version: str = "1.0.0" # RSRHelper
## Syncretic
## https://forums.macrumors.com/members/syncretic.1173816/
@@ -412,6 +413,10 @@ class Constants:
def backlight_injector_path(self):
return self.payload_kexts_path / Path(f"Misc/BacklightInjector-v{self.backlight_injector_version}.zip")
@property
def backlight_injectorA_path(self):
return self.payload_kexts_path / Path(f"Misc/BacklightInjectorA-v{self.backlight_injectorA_version}.zip")
@property
def cpufriend_path(self):
return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}-{self.kext_variant}.zip")

View File

@@ -2795,7 +2795,7 @@ class wx_python_gui:
self.gpu_dropdown.Bind(wx.EVT_CHOICE, self.gpu_selection_click)
self.gpu_dropdown.Centre(wx.HORIZONTAL)
self.gpu_dropdown.SetToolTip(wx.ToolTip("Configures MXM GPU Vendor logic on pre-built models\nIf you are not using MXM iMacs, please leave this setting as is."))
models = ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2"]
models = ["iMac9,1", "iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2"]
if (not self.constants.custom_model and self.computer.real_model not in models) or (self.constants.custom_model and self.constants.custom_model not in models):
self.gpu_dropdown.Disable()
@@ -2822,7 +2822,7 @@ class wx_python_gui:
self.timeout_spinner.GetPosition().y + self.timeout_spinner.GetSize().height + 5))
self.set_amd_gop_injection.SetValue(self.constants.amd_gop_injection)
self.set_amd_gop_injection.Bind(wx.EVT_CHECKBOX, self.amd_gop_injection_checkbox_click)
models = ["iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2", "MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1"]
models = ["iMac9,1", "iMac10,1", "iMac11,1", "iMac11,2", "iMac11,3", "iMac12,1", "iMac12,2", "MacPro3,1", "MacPro4,1", "MacPro5,1", "Xserve2,1", "Xserve3,1"]
if (not self.constants.custom_model and self.computer.real_model not in models) or (self.constants.custom_model and self.constants.custom_model not in models):
self.set_amd_gop_injection.Disable()