check default extended features for more models

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2022-01-15 10:06:07 +03:00
parent c493261b9c
commit 2de9d98382
2 changed files with 65 additions and 47 deletions

View File

@ -2335,13 +2335,13 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
}
break;
}
switch (MacModel) {
case MacBook81:
// switch (MacModel) {
// case MacBook81:
//devprop_add_value(device, "AAPL,ig-tcon-scaler", broadwell_hd_vals[0], 4);
break;
default:
break;
}
// break;
// default:
// break;
// }
//devprop_add_value(device, "graphic-options", broadwell_hd_vals[1], 4);
break;
@ -2513,25 +2513,25 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
}
break;
}
switch (GlobalConfig.IgPlatform) {
case (UINT32)0x19020001:
case (UINT32)0x19120001:
case (UINT32)0x19170001:
case (UINT32)0x19320001:
break;
default:
switch (MacModel) {
case MacBook91:
// switch (GlobalConfig.IgPlatform) {
// case (UINT32)0x19020001:
// case (UINT32)0x19120001:
// case (UINT32)0x19170001:
// case (UINT32)0x19320001:
// break;
// default:
// switch (MacModel) {
// case MacBook91:
//devprop_add_value(device, "AAPL00,PanelCycleDelay", skylake_hd_vals[2], 4);
//devprop_add_value(device, "AAPL00,PanelPowerDown", skylake_hd_vals[3], 4);
//devprop_add_value(device, "AAPL00,PanelPowerOff", skylake_hd_vals[4], 4);
//devprop_add_value(device, "AAPL00,PanelPowerOn", skylake_hd_vals[5], 4);
//devprop_add_value(device, "AAPL00,PanelPowerUp", skylake_hd_vals[6], 4);
//devprop_add_value(device, "graphic-options", skylake_hd_vals[11], 4);
break;
case MacBookPro131:
case MacBookPro132:
case MacBookPro133: // it has only the "graphic-options" value. However, we use built-in graphics.
// break;
// case MacBookPro131:
// case MacBookPro132:
// case MacBookPro133: // it has only the "graphic-options" value. However, we use built-in graphics.
//devprop_add_value(device, "AAPL,Gfx324", skylake_hd_vals[0], 4);
//devprop_add_value(device, "AAPL00,PanelCycleDelay", skylake_hd_vals[2], 4);
//devprop_add_value(device, "AAPL00,PanelPowerDown", skylake_hd_vals[7], 4);
@ -2539,12 +2539,12 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
//devprop_add_value(device, "AAPL00,PanelPowerOn", skylake_hd_vals[9], 4);
//devprop_add_value(device, "AAPL00,PanelPowerUp", skylake_hd_vals[10], 4);
//devprop_add_value(device, "graphic-options", skylake_hd_vals[11], 4);
break;
default:
break;
}
break;
}
// break;
// default:
// break;
// }
// break;
// }
// if wakes up with an HDMI connected, sometimes this value causes force reboot in 10.14+
if ( macOSVersion.notEmpty() && macOSVersion < MacOsVersion("10.14"_XS8) ) {
@ -2871,24 +2871,24 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
}
break;
}
switch (GlobalConfig.IgPlatform) {
case (UINT32)0x59120003:
case (UINT32)0x59180002:
break;
default:
switch (MacModel) {
case MacBook101:
case MacBookAir81:
// switch (GlobalConfig.IgPlatform) {
// case (UINT32)0x59120003:
// case (UINT32)0x59180002:
// break;
// default:
// switch (MacModel) {
// case MacBook101:
// case MacBookAir81:
//devprop_add_value(device, "AAPL00,PanelCycleDelay", kabylake_hd_vals[2], 4);
//devprop_add_value(device, "AAPL00,PanelPowerDown", kabylake_hd_vals[3], 4);
//devprop_add_value(device, "AAPL00,PanelPowerOff", kabylake_hd_vals[4], 4);
//devprop_add_value(device, "AAPL00,PanelPowerOn", kabylake_hd_vals[5], 4);
//devprop_add_value(device, "AAPL00,PanelPowerUp", kabylake_hd_vals[6], 4);
//devprop_add_value(device, "graphic-options", kabylake_hd_vals[11], 4);
break;
case MacBookPro141:
case MacBookPro142:
case MacBookPro143: // it has only the "graphic-options" value. However, we use built-in graphics.
// break;
// case MacBookPro141:
// case MacBookPro142:
// case MacBookPro143: // it has only the "graphic-options" value. However, we use built-in graphics.
//devprop_add_value(device, "AAPL,Gfx324", kabylake_hd_vals[0], 4);
//devprop_add_value(device, "AAPL00,PanelCycleDelay", kabylake_hd_vals[2], 4);
//devprop_add_value(device, "AAPL00,PanelPowerDown", kabylake_hd_vals[7], 4);
@ -2896,14 +2896,14 @@ XBool setup_gma_devprop(const MacOsVersion& macOSVersion, const XString8& BuildV
//devprop_add_value(device, "AAPL00,PanelPowerOn", kabylake_hd_vals[9], 4);
//devprop_add_value(device, "AAPL00,PanelPowerUp", kabylake_hd_vals[10], 4);
//devprop_add_value(device, "graphic-options", kabylake_hd_vals[11], 4);
break;
default:
break;
}
break;
}
// break;
// default:
// break;
// }
// break;
// }
// if wakes up with an HDMI connected, somtimes this value causes force reboot in 10.14+
// if wakes up with an HDMI connected, sometimes this value causes force reboot in 10.14+
if ( macOSVersion.notEmpty() && macOSVersion < MacOsVersion("10.14"_XS8)) {
devprop_add_value(device, "AAPL,GfxYTile", kabylake_hd_vals[1], 4);
}

View File

@ -270,9 +270,11 @@ uint32_t GetFwFeatures(MacModel Model)
uint64_t GetExtFwFeatures(MacModel Model)
{
// FirmwareFeatures for 12+
// (Extended)FirmwareFeatures for 12+
switch ( Model )
{
case MacBookPro114:
case MacBookPro115:
case MacBookPro131:
case MacBookPro132:
case MacBookPro141:
@ -281,6 +283,11 @@ uint64_t GetExtFwFeatures(MacModel Model)
case iMac181:
case iMac182:
case iMac183:
case iMac191:
case iMac192:
case iMac201:
case iMac202:
case iMacPro11:
return 0x8FC0FE177ull;
break;
case MacBook91:
@ -297,15 +304,26 @@ uint64_t GetExtFwFeatures(MacModel Model)
case MacBookPro161:
case MacBookAir81:
case MacBookAir82:
case MacBookAir91:
case MacBookPro162:
case MacBookPro163:
case MacBookPro164:
case iMac161:
case iMac162:
case MacMini71:
case MacMini81:
return 0x8FC0FE137ull;
break;
case MacBook61:
case MacBook71:
case MacBook81:
return 0x8FC0FE13Full;
break;
case MacPro61:
return 0x8E80FE177ull;
break;
case MacPro71:
return 0x8FD8FF53Full;
break;
default:
return (uint64_t)GetFwFeatures(Model); //unknown - use oem SMBIOS value to be default
break;