Skip to content

Commit

Permalink
Merge tag 'platform-drivers-x86-v6.15-4' of git://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers fixes from Ilpo Järvinen:
 "Fixes and new HW support

   - amd/pmc: Require at least 2.5 seconds between HW sleep cycles

   - alienware-wmi-wmax:
       - Add support for Alienware m15 R7
       - Fix error handling to avoid uninitialized variable

   - asus-wmi: Disable OOBE state also on resume

   - ideapad-laptop: Support a few new buttons

   - intel/hid: Add Panther Lake support

   - intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug"

* tag 'platform-drivers-x86-v6.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: ideapad-laptop: add support for some new buttons
  platform/x86: asus-wmi: Disable OOBE state after resume from hibernation
  platform/x86: alienware-wmi-wmax: Add support for Alienware m15 R7
  platform/x86/intel: hid: Add Pantherlake support
  platform/x86: alienware-wmi-wmax: Fix uninitialized variable due to bad error handling
  platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug
  platform/x86/amd: pmc: Require at least 2.5 seconds between HW sleep cycles
  • Loading branch information
Linus Torvalds committed Apr 29, 2025
2 parents 4b5256f + 02c6e43 commit 02d4004
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 23 deletions.
7 changes: 3 additions & 4 deletions drivers/platform/x86/amd/pmc/pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,10 +644,9 @@ static void amd_pmc_s2idle_check(void)
struct smu_metrics table;
int rc;

/* CZN: Ensure that future s0i3 entry attempts at least 10ms passed */
if (pdev->cpu_id == AMD_CPU_ID_CZN && !get_metrics_table(pdev, &table) &&
table.s0i3_last_entry_status)
usleep_range(10000, 20000);
/* Avoid triggering OVP */
if (!get_metrics_table(pdev, &table) && table.s0i3_last_entry_status)
msleep(2500);

/* Dump the IdleMask before we add to the STB */
amd_pmc_idlemask_read(pdev, pdev->dev, NULL);
Expand Down
11 changes: 10 additions & 1 deletion drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ struct asus_wmi {

u32 kbd_rgb_dev;
bool kbd_rgb_state_available;
bool oobe_state_available;

u8 throttle_thermal_policy_mode;
u32 throttle_thermal_policy_dev;
Expand Down Expand Up @@ -1826,7 +1827,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
goto error;
}

if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) {
if (asus->oobe_state_available) {
/*
* Disable OOBE state, so that e.g. the keyboard backlight
* works.
Expand Down Expand Up @@ -4723,6 +4724,7 @@ static int asus_wmi_add(struct platform_device *pdev)
asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU);
asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE);
asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE)
&& dmi_check_system(asus_ally_mcu_quirk);

Expand Down Expand Up @@ -4970,6 +4972,13 @@ static int asus_hotk_restore(struct device *device)
}
if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
kbd_led_update(asus);
if (asus->oobe_state_available) {
/*
* Disable OOBE state, so that e.g. the keyboard backlight
* works.
*/
asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL);
}

if (asus_wmi_has_fnlock_key(asus))
asus_wmi_fnlock_update(asus);
Expand Down
14 changes: 10 additions & 4 deletions drivers/platform/x86/dell/alienware-wmi-wmax.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = {
},
.driver_data = &generic_quirks,
},
{
.ident = "Alienware m15 R7",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15 R7"),
},
.driver_data = &generic_quirks,
},
{
.ident = "Alienware m16 R1",
.matches = {
Expand Down Expand Up @@ -655,12 +663,10 @@ static int thermal_profile_probe(void *drvdata, unsigned long *choices)
for (u32 i = 0; i < sys_desc[3]; i++) {
ret = wmax_thermal_information(priv->wdev, WMAX_OPERATION_LIST_IDS,
i + first_mode, &out_data);

if (ret == -EIO)
return ret;

if (ret == -EBADRQC)
break;
if (ret)
return ret;

if (!is_wmax_thermal_code(out_data))
continue;
Expand Down
16 changes: 16 additions & 0 deletions drivers/platform/x86/ideapad-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,16 @@ static const struct key_entry ideapad_keymap[] = {
/* Specific to some newer models */
{ KE_KEY, 0x3e | IDEAPAD_WMI_KEY, { KEY_MICMUTE } },
{ KE_KEY, 0x3f | IDEAPAD_WMI_KEY, { KEY_RFKILL } },
/* Star- (User Assignable Key) */
{ KE_KEY, 0x44 | IDEAPAD_WMI_KEY, { KEY_PROG1 } },
/* Eye */
{ KE_KEY, 0x45 | IDEAPAD_WMI_KEY, { KEY_PROG3 } },
/* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
{ KE_KEY, 0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
/* shift + prtsc */
{ KE_KEY, 0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
{ KE_KEY, 0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
{ KE_KEY, 0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },

{ KE_END },
};
Expand Down Expand Up @@ -2080,6 +2090,12 @@ static void ideapad_wmi_notify(struct wmi_device *wdev, union acpi_object *data)
dev_dbg(&wdev->dev, "WMI fn-key event: 0x%llx\n",
data->integer.value);

/* performance button triggered by 0x3d */
if (data->integer.value == 0x3d && priv->dytc) {
platform_profile_cycle();
break;
}

/* 0x02 FnLock, 0x03 Esc */
if (data->integer.value == 0x02 || data->integer.value == 0x03)
ideapad_fn_lock_led_notify(priv, data->integer.value == 0x02);
Expand Down
21 changes: 11 additions & 10 deletions drivers/platform/x86/intel/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alex Hung");

static const struct acpi_device_id intel_hid_ids[] = {
{"INT33D5", 0},
{"INTC1051", 0},
{"INTC1054", 0},
{"INTC1070", 0},
{"INTC1076", 0},
{"INTC1077", 0},
{"INTC1078", 0},
{"INTC107B", 0},
{"INTC10CB", 0},
{"", 0},
{ "INT33D5" },
{ "INTC1051" },
{ "INTC1054" },
{ "INTC1070" },
{ "INTC1076" },
{ "INTC1077" },
{ "INTC1078" },
{ "INTC107B" },
{ "INTC10CB" },
{ "INTC10CC" },
{ }
};
MODULE_DEVICE_TABLE(acpi, intel_hid_ids);

Expand Down
13 changes: 9 additions & 4 deletions drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,13 @@ static int uncore_event_cpu_online(unsigned int cpu)
{
struct uncore_data *data;
int target;
int ret;

/* Check if there is an online cpu in the package for uncore MSR */
target = cpumask_any_and(&uncore_cpu_mask, topology_die_cpumask(cpu));
if (target < nr_cpu_ids)
return 0;

/* Use this CPU on this die as a control CPU */
cpumask_set_cpu(cpu, &uncore_cpu_mask);

data = uncore_get_instance(cpu);
if (!data)
return 0;
Expand All @@ -163,7 +161,14 @@ static int uncore_event_cpu_online(unsigned int cpu)
data->die_id = topology_die_id(cpu);
data->domain_id = UNCORE_DOMAIN_ID_INVALID;

return uncore_freq_add_entry(data, cpu);
ret = uncore_freq_add_entry(data, cpu);
if (ret)
return ret;

/* Use this CPU on this die as a control CPU */
cpumask_set_cpu(cpu, &uncore_cpu_mask);

return 0;
}

static int uncore_event_cpu_offline(unsigned int cpu)
Expand Down

0 comments on commit 02d4004

Please sign in to comment.