Modify and add TDP device definitions

- Basic 120W upper limit over all
- Change min limit to 1W
- Add Polaris gen 2
- Add Polaris/Stellaris AMD gen 3
This commit is contained in:
Christoffer Sandberg 2021-11-12 23:10:10 +01:00
parent 91742ab1c5
commit 68800661b4
2 changed files with 31 additions and 8 deletions

View file

@ -224,18 +224,27 @@ static u32 uw_set_fan_auto(void)
/*
* TDP boundary definitions per device
*/
static int tdp_min_ph4tux[] = { 0x07, 0x07, 0x00 };
static int tdp_min_ph4tux[] = { 0x01, 0x01, 0x00 };
static int tdp_max_ph4tux[] = { 0x26, 0x26, 0x00 };
static int tdp_min_ph4trx[] = { 0x07, 0x07, 0x00 };
static int tdp_min_ph4trx[] = { 0x01, 0x01, 0x00 };
static int tdp_max_ph4trx[] = { 0x32, 0x32, 0x00 };
static int tdp_min_ph4tqx[] = { 0x07, 0x07, 0x00 };
static int tdp_min_ph4tqx[] = { 0x01, 0x01, 0x00 };
static int tdp_max_ph4tqx[] = { 0x32, 0x32, 0x00 };
static int tdp_min_gmxtgxx[] = { 0x00, 0x00, 0x00 };
static int tdp_min_gmxngxx[] = { 0x01, 0x01, 0x01 };
static int tdp_max_gmxngxx[] = { 0x78, 0x78, 0x78 };
static int tdp_min_gmxmgxx[] = { 0x01, 0x01, 0x01 };
static int tdp_max_gmxmgxx[] = { 0x78, 0x78, 0x78 };
static int tdp_min_gmxtgxx[] = { 0x01, 0x01, 0x01 };
static int tdp_max_gmxtgxx[] = { 0x78, 0x78, 0x78 };
static int tdp_min_gmxzgxx[] = { 0x01, 0x01, 0x01 };
static int tdp_max_gmxzgxx[] = { 0x78, 0x78, 0x78 };
static int uw_get_tdp_min(u8 tdp_index)
{
int tdp_min = 0;
@ -248,9 +257,16 @@ static int uw_get_tdp_min(u8 tdp_index)
tdp_min = tdp_min_ph4trx[tdp_index];
} else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX")) {
tdp_min = tdp_min_ph4tqx[tdp_index];
} else if ( dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA02")) {
tdp_min = tdp_min_gmxngxx[tdp_index];
} else if ( dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI02")) {
tdp_min = tdp_min_gmxmgxx[tdp_index];
} else if ( dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI03")
|| dmi_match(DMI_PRODUCT_SKU, "STELLARIS1XI03")) {
tdp_min = tdp_min_gmxtgxx[tdp_index];
} else if ( dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA03")
|| dmi_match(DMI_PRODUCT_SKU, "STELLARIS1XA03")) {
tdp_min = tdp_min_gmxzgxx[tdp_index];
}
return tdp_min;
@ -268,9 +284,16 @@ static int uw_get_tdp_max(u8 tdp_index)
tdp_max = tdp_max_ph4trx[tdp_index];
} else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX")) {
tdp_max = tdp_max_ph4tqx[tdp_index];
} else if ( dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA02")) {
tdp_max = tdp_max_gmxngxx[tdp_index];
} else if ( dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI02")) {
tdp_max = tdp_max_gmxmgxx[tdp_index];
} else if ( dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI03")
|| dmi_match(DMI_PRODUCT_SKU, "STELLARIS1XI03")) {
tdp_max = tdp_max_gmxtgxx[tdp_index];
} else if ( dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA03")
|| dmi_match(DMI_PRODUCT_SKU, "STELLARIS1XA03")) {
tdp_max = tdp_max_gmxzgxx[tdp_index];
}
return tdp_max;

View file

@ -231,12 +231,12 @@ struct uniwill_device_features_t *uniwill_get_device_features(void)
// Device check for three configurable TDPs
uw_feats->uniwill_tdp_config_three = false
//|| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA02")
//|| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI02")
//|| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA03")
|| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA02")
|| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI02")
|| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA03")
|| dmi_match(DMI_PRODUCT_SKU, "POLARIS1XI03")
|| dmi_match(DMI_PRODUCT_SKU, "STELLARIS1XI03")
//|| dmi_match(DMI_PRODUCT_SKU, "STELLARIS1XA03")
|| dmi_match(DMI_PRODUCT_SKU, "STELLARIS1XA03")
;
return uw_feats;