Add support for AMD GPUs of GCN 1, 2, and 3 generations

This commit is contained in:
Hoang Hong Quan
2024-07-30 14:42:50 +07:00
parent c6eceaa3a0
commit e27bead52e
4 changed files with 39 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
from Scripts.datasets import chipset_data
from Scripts.datasets import cpu_data
from Scripts.datasets import gpu_data
from Scripts.datasets import pci_data
from Scripts import utils
@@ -86,6 +87,8 @@ class CompatibilityChecker:
self.min_supported_macos_version = max(17, self.min_supported_macos_version)
elif "Vega 10" in gpu_codename or "Polaris" in gpu_codename or "550" in gpu_name:
self.min_supported_macos_version = max(17, self.min_supported_macos_version)
elif self.utils.contains_any(gpu_data.AMDCodename, gpu_codename):
self.max_supported_macos_version = 21
else:
self.max_supported_macos_version = self.min_supported_macos_version = -1
is_supported_discrete_gpu = is_supported_gpu = False

View File

@@ -1,5 +1,6 @@
from Scripts.datasets import chipset_data
from Scripts.datasets import cpu_data
from Scripts.datasets import gpu_data
from Scripts import codec_layouts
from Scripts import gathering_files
from Scripts import smbios
@@ -164,7 +165,7 @@ class ConfigProdigy:
return kernel_patch
def boot_args(self, motherboard_name, platform, cpu_manufacturer, cpu_codename, discrete_gpu_codename, integrated_gpu_name, ethernet_pci, codec_id, touchpad_communication, unsupported_devices, custom_cpu_name, macos_version):
def boot_args(self, motherboard_name, platform, cpu_manufacturer, cpu_codename, discrete_gpu_codename, discrete_gpu_id, integrated_gpu_name, ethernet_pci, codec_id, touchpad_communication, unsupported_devices, custom_cpu_name, macos_version):
boot_args = [
"-v",
"debug=0x100",
@@ -217,6 +218,12 @@ class ConfigProdigy:
if "Integrated GPU" in ",".join(unsupported_devices):
boot_args.append("-wegnoigpu")
if discrete_gpu_id in ["1002-6610", "1002-682B", "1002-6837", "1002-683D", "1002-683F"]:
boot_args.append("radpg=15")
if discrete_gpu_id in ["1002-67B0", "1002-67B1", "1002-67B8", "1002-6810", "1002-6811"]:
boot_args.append("-raddvi")
return " ".join(boot_args)
def csr_active_config(self, macos_version):
@@ -329,6 +336,7 @@ class ConfigProdigy:
hardware.get("CPU Manufacturer"),
hardware.get("CPU Codename"),
hardware.get("Discrete GPU").get("GPU Codename", ""),
hardware.get("Discrete GPU").get("Device ID", ""),
hardware.get("Integrated GPU Name"),
hardware.get("Ethernet (PCI)"),
hardware.get("Codec ID"),

View File

@@ -0,0 +1,12 @@
# Resource: https://en.wikipedia.org/wiki/Graphics_Core_Next
AMDCodename = [
"Hainan",
"Oland",
"Cape Verde",
"Pitcairn",
"Tahiti",
"Bonaire",
"Hawaii",
"Tonga",
"Fiji"
]

View File

@@ -1139,6 +1139,20 @@ UnsupportedNVMeSSDIDs = {
"2646-2263": "Kingston A2000"
}
# Resource: https://pci-ids.ucw.cz/
SpoofGPUIDs = {
"1002-699F": "1002-67FF" # AMD RX 550 (Lexa core)
"1002-6611": "1002-6610", # AMD Radeon HD 8570 / R5 430 / R7 240/340 / Radeon 520
"1002-6613": "1002-6610", # AMD Radeon R7 240/340 / Radeon 520
"1002-6617": "1002-6610", # AMD Radeon R7 240
"1002-6649": "1002-665C", # AMD FirePro W5100
"1002-665C": "1002-6658", # AMD Radeon HD 7790/8770 / R7 360 / R9 260/360
"1002-679A": "1002-6798", # AMD Radeon HD 7950/8950 / R9 280
"1002-67B1": "1002-67B0", # AMD Radeon R9 290/390
"1002-6811": "1002-6810", # AMD Radeon R7 370 / R9 270/370
"1002-6819": "1002-6818", # AMD Radeon HD 7850 / R7 265 / R9 270 1024SP
"1002-682B": "1002-683D", # AMD Radeon HD 8830M / R7 250
"1002-683F": "1002-683D", # AMD Radeon HD 7750/8740 / R7 250E
"1002-6930": "1002-6938", # AMD Radeon R9 380
"1002-6939": "1002-6938", # AMD Radeon R9 285/380
"1002-699F": "1002-67FF", # AMD Radeon RX 550 (Lexa core)
}