platform-drivers-x86 for v6.12-4
Highlights: - AMD PMF: Add new hardware id - AMD PMC: Fix crash when loaded with enable_stb=1 on devices without STB - Dell: Add Alienware hwid for Alienware systems with Dell WMI interface - thinkpad_acpi: Quirk to fix wrong fan speed readings on L480 - New hotkey mappings for Dell and Lenovo laptops The following is an automated git shortlog grouped by driver: dell-smbios-base: - Extends support to Alienware products dell-wmi-base: - Handle META key Lock/Unlock events ideapad-laptop: - add missing Ideapad Pro 5 fn keys platform/x86/amd/pmc: - Detect when STB is not available platform/x86/amd/pmf: - Add SMU metrics table support for 1Ah family 60h model thinkpad_acpi: - Fix for ThinkPad's with ECFW showing incorrect fan speed -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmcrWl8UHGhkZWdvZWRl QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9yMAAf/S1jCHG5TzIUN4ChncXGEC6vkVJ9t C9eqErGqx0Dm3VUa5e6geZzpDoD37AaLP7K/C6lAxxYSpYd/VYYIcqMihtIcYsTp SRuWWT5qDq3xhGXd1bbe5PU92BQ7vbkoOxvWbRCpHNjaI5xKaRUnxycCAqJaqo5E 835tx3urhiMRucT0YUtmJoiclfGkIvBfjHFemC7dCAOmpqWAJxe4MFb0HXTyw6ja GIcTmzxZpLNGmiiB4DWRs0EyjCfcFE/xJeny14/j36XfMu82vv8dAHIwA0FiaA3e Jq0eoWqRfZfaTmkcYY64C2QX1WYEc+ANHmUhOGNyY+Zyt1EuoaYWYsLgXg== =1cZL -----END PGP SIGNATURE----- Merge tag 'platform-drivers-x86-v6.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - AMD PMF: Add new hardware id - AMD PMC: Fix crash when loaded with enable_stb=1 on devices without STB - Dell: Add Alienware hwid for Alienware systems with Dell WMI interface - thinkpad_acpi: Quirk to fix wrong fan speed readings on L480 - New hotkey mappings for Dell and Lenovo laptops * tag 'platform-drivers-x86-v6.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: thinkpad_acpi: Fix for ThinkPad's with ECFW showing incorrect fan speed platform/x86: ideapad-laptop: add missing Ideapad Pro 5 fn keys platform/x86: dell-wmi-base: Handle META key Lock/Unlock events platform/x86: dell-smbios-base: Extends support to Alienware products platform/x86/amd/pmc: Detect when STB is not available platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model
This commit is contained in:
commit
b226d01983
@ -998,6 +998,11 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
|
||||
amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_LOW, &phys_addr_low, dev->s2d_msg_id, true);
|
||||
amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_HIGH, &phys_addr_hi, dev->s2d_msg_id, true);
|
||||
|
||||
if (!phys_addr_hi && !phys_addr_low) {
|
||||
dev_err(dev->dev, "STB is not enabled on the system; disable enable_stb or contact system vendor\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stb_phys_addr = ((u64)phys_addr_hi << 32 | phys_addr_low);
|
||||
|
||||
/* Clear msg_port for other SMU operation */
|
||||
|
@ -261,6 +261,7 @@ int amd_pmf_set_dram_addr(struct amd_pmf_dev *dev, bool alloc_buffer)
|
||||
dev->mtable_size = sizeof(dev->m_table);
|
||||
break;
|
||||
case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
|
||||
case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
|
||||
dev->mtable_size = sizeof(dev->m_table_v2);
|
||||
break;
|
||||
default:
|
||||
|
@ -86,6 +86,7 @@ static void amd_pmf_get_smu_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_ta
|
||||
ARRAY_SIZE(dev->m_table.avg_core_c0residency), in);
|
||||
break;
|
||||
case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
|
||||
case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
|
||||
memcpy(&dev->m_table_v2, dev->buf, dev->mtable_size);
|
||||
in->ev_info.socket_power = dev->m_table_v2.apu_power + dev->m_table_v2.dgpu_power;
|
||||
in->ev_info.skin_temperature = dev->m_table_v2.skin_temp;
|
||||
|
@ -576,6 +576,7 @@ static int __init dell_smbios_init(void)
|
||||
int ret, wmi, smm;
|
||||
|
||||
if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
|
||||
!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) &&
|
||||
!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
|
||||
pr_err("Unable to run on non-Dell system\n");
|
||||
return -ENODEV;
|
||||
|
@ -80,6 +80,12 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = {
|
||||
static const struct key_entry dell_wmi_keymap_type_0000[] = {
|
||||
{ KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
|
||||
|
||||
/* Meta key lock */
|
||||
{ KE_IGNORE, 0xe000, { KEY_RIGHTMETA } },
|
||||
|
||||
/* Meta key unlock */
|
||||
{ KE_IGNORE, 0xe001, { KEY_RIGHTMETA } },
|
||||
|
||||
/* Key code is followed by brightness level */
|
||||
{ KE_KEY, 0xe005, { KEY_BRIGHTNESSDOWN } },
|
||||
{ KE_KEY, 0xe006, { KEY_BRIGHTNESSUP } },
|
||||
|
@ -1294,6 +1294,9 @@ static const struct key_entry ideapad_keymap[] = {
|
||||
{ KE_KEY, 0x27 | IDEAPAD_WMI_KEY, { KEY_HELP } },
|
||||
/* Refresh Rate Toggle */
|
||||
{ KE_KEY, 0x0a | IDEAPAD_WMI_KEY, { KEY_REFRESH_RATE_TOGGLE } },
|
||||
/* Specific to some newer models */
|
||||
{ KE_KEY, 0x3e | IDEAPAD_WMI_KEY, { KEY_MICMUTE } },
|
||||
{ KE_KEY, 0x3f | IDEAPAD_WMI_KEY, { KEY_RFKILL } },
|
||||
|
||||
{ KE_END },
|
||||
};
|
||||
|
@ -7936,6 +7936,7 @@ static u8 fan_control_resume_level;
|
||||
static int fan_watchdog_maxinterval;
|
||||
|
||||
static bool fan_with_ns_addr;
|
||||
static bool ecfw_with_fan_dec_rpm;
|
||||
|
||||
static struct mutex fan_mutex;
|
||||
|
||||
@ -8682,7 +8683,11 @@ static ssize_t fan_fan1_input_show(struct device *dev,
|
||||
if (res < 0)
|
||||
return res;
|
||||
|
||||
/* Check for fan speeds displayed in hexadecimal */
|
||||
if (!ecfw_with_fan_dec_rpm)
|
||||
return sysfs_emit(buf, "%u\n", speed);
|
||||
else
|
||||
return sysfs_emit(buf, "%x\n", speed);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(fan1_input, S_IRUGO, fan_fan1_input_show, NULL);
|
||||
@ -8699,7 +8704,11 @@ static ssize_t fan_fan2_input_show(struct device *dev,
|
||||
if (res < 0)
|
||||
return res;
|
||||
|
||||
/* Check for fan speeds displayed in hexadecimal */
|
||||
if (!ecfw_with_fan_dec_rpm)
|
||||
return sysfs_emit(buf, "%u\n", speed);
|
||||
else
|
||||
return sysfs_emit(buf, "%x\n", speed);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(fan2_input, S_IRUGO, fan_fan2_input_show, NULL);
|
||||
@ -8775,6 +8784,7 @@ static const struct attribute_group fan_driver_attr_group = {
|
||||
#define TPACPI_FAN_2CTL 0x0004 /* selects fan2 control */
|
||||
#define TPACPI_FAN_NOFAN 0x0008 /* no fan available */
|
||||
#define TPACPI_FAN_NS 0x0010 /* For EC with non-Standard register addresses */
|
||||
#define TPACPI_FAN_DECRPM 0x0020 /* For ECFW's with RPM in register as decimal */
|
||||
|
||||
static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
|
||||
TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1),
|
||||
@ -8803,6 +8813,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
|
||||
TPACPI_Q_LNV3('R', '1', 'D', TPACPI_FAN_NS), /* 11e Gen5 GL-R */
|
||||
TPACPI_Q_LNV3('R', '0', 'V', TPACPI_FAN_NS), /* 11e Gen5 KL-Y */
|
||||
TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN), /* X1 Tablet (2nd gen) */
|
||||
TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */
|
||||
};
|
||||
|
||||
static int __init fan_init(struct ibm_init_struct *iibm)
|
||||
@ -8847,6 +8858,13 @@ static int __init fan_init(struct ibm_init_struct *iibm)
|
||||
tp_features.fan_ctrl_status_undef = 1;
|
||||
}
|
||||
|
||||
/* Check for the EC/BIOS with RPM reported in decimal*/
|
||||
if (quirks & TPACPI_FAN_DECRPM) {
|
||||
pr_info("ECFW with fan RPM as decimal in EC register\n");
|
||||
ecfw_with_fan_dec_rpm = 1;
|
||||
tp_features.fan_ctrl_status_undef = 1;
|
||||
}
|
||||
|
||||
if (gfan_handle) {
|
||||
/* 570, 600e/x, 770e, 770x */
|
||||
fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN;
|
||||
@ -9067,7 +9085,11 @@ static int fan_read(struct seq_file *m)
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
/* Check for fan speeds displayed in hexadecimal */
|
||||
if (!ecfw_with_fan_dec_rpm)
|
||||
seq_printf(m, "speed:\t\t%d\n", speed);
|
||||
else
|
||||
seq_printf(m, "speed:\t\t%x\n", speed);
|
||||
|
||||
if (fan_status_access_mode == TPACPI_FAN_RD_TPEC_NS) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user