Skip to content

Commit 02d4004

Browse files
committed
Merge tag 'platform-drivers-x86-v6.15-4' of git://git.kernel.org/pub/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
2 parents 4b5256f + 02c6e43 commit 02d4004

File tree

6 files changed

+59
-23
lines changed

6 files changed

+59
-23
lines changed

drivers/platform/x86/amd/pmc/pmc.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,10 +644,9 @@ static void amd_pmc_s2idle_check(void)
644644
struct smu_metrics table;
645645
int rc;
646646

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

652651
/* Dump the IdleMask before we add to the STB */
653652
amd_pmc_idlemask_read(pdev, pdev->dev, NULL);

drivers/platform/x86/asus-wmi.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ struct asus_wmi {
304304

305305
u32 kbd_rgb_dev;
306306
bool kbd_rgb_state_available;
307+
bool oobe_state_available;
307308

308309
u8 throttle_thermal_policy_mode;
309310
u32 throttle_thermal_policy_dev;
@@ -1826,7 +1827,7 @@ static int asus_wmi_led_init(struct asus_wmi *asus)
18261827
goto error;
18271828
}
18281829

1829-
if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE)) {
1830+
if (asus->oobe_state_available) {
18301831
/*
18311832
* Disable OOBE state, so that e.g. the keyboard backlight
18321833
* works.
@@ -4723,6 +4724,7 @@ static int asus_wmi_add(struct platform_device *pdev)
47234724
asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU);
47244725
asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU);
47254726
asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE);
4727+
asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE);
47264728
asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE)
47274729
&& dmi_check_system(asus_ally_mcu_quirk);
47284730

@@ -4970,6 +4972,13 @@ static int asus_hotk_restore(struct device *device)
49704972
}
49714973
if (!IS_ERR_OR_NULL(asus->kbd_led.dev))
49724974
kbd_led_update(asus);
4975+
if (asus->oobe_state_available) {
4976+
/*
4977+
* Disable OOBE state, so that e.g. the keyboard backlight
4978+
* works.
4979+
*/
4980+
asus_wmi_set_devstate(ASUS_WMI_DEVID_OOBE, 1, NULL);
4981+
}
49734982

49744983
if (asus_wmi_has_fnlock_key(asus))
49754984
asus_wmi_fnlock_update(asus);

drivers/platform/x86/dell/alienware-wmi-wmax.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = {
6969
},
7070
.driver_data = &generic_quirks,
7171
},
72+
{
73+
.ident = "Alienware m15 R7",
74+
.matches = {
75+
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
76+
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15 R7"),
77+
},
78+
.driver_data = &generic_quirks,
79+
},
7280
{
7381
.ident = "Alienware m16 R1",
7482
.matches = {
@@ -655,12 +663,10 @@ static int thermal_profile_probe(void *drvdata, unsigned long *choices)
655663
for (u32 i = 0; i < sys_desc[3]; i++) {
656664
ret = wmax_thermal_information(priv->wdev, WMAX_OPERATION_LIST_IDS,
657665
i + first_mode, &out_data);
658-
659-
if (ret == -EIO)
660-
return ret;
661-
662666
if (ret == -EBADRQC)
663667
break;
668+
if (ret)
669+
return ret;
664670

665671
if (!is_wmax_thermal_code(out_data))
666672
continue;

drivers/platform/x86/ideapad-laptop.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,16 @@ static const struct key_entry ideapad_keymap[] = {
12941294
/* Specific to some newer models */
12951295
{ KE_KEY, 0x3e | IDEAPAD_WMI_KEY, { KEY_MICMUTE } },
12961296
{ KE_KEY, 0x3f | IDEAPAD_WMI_KEY, { KEY_RFKILL } },
1297+
/* Star- (User Assignable Key) */
1298+
{ KE_KEY, 0x44 | IDEAPAD_WMI_KEY, { KEY_PROG1 } },
1299+
/* Eye */
1300+
{ KE_KEY, 0x45 | IDEAPAD_WMI_KEY, { KEY_PROG3 } },
1301+
/* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
1302+
{ KE_KEY, 0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
1303+
/* shift + prtsc */
1304+
{ KE_KEY, 0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
1305+
{ KE_KEY, 0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
1306+
{ KE_KEY, 0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
12971307

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

2093+
/* performance button triggered by 0x3d */
2094+
if (data->integer.value == 0x3d && priv->dytc) {
2095+
platform_profile_cycle();
2096+
break;
2097+
}
2098+
20832099
/* 0x02 FnLock, 0x03 Esc */
20842100
if (data->integer.value == 0x02 || data->integer.value == 0x03)
20852101
ideapad_fn_lock_led_notify(priv, data->integer.value == 0x02);

drivers/platform/x86/intel/hid.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ MODULE_LICENSE("GPL");
4444
MODULE_AUTHOR("Alex Hung");
4545

4646
static const struct acpi_device_id intel_hid_ids[] = {
47-
{"INT33D5", 0},
48-
{"INTC1051", 0},
49-
{"INTC1054", 0},
50-
{"INTC1070", 0},
51-
{"INTC1076", 0},
52-
{"INTC1077", 0},
53-
{"INTC1078", 0},
54-
{"INTC107B", 0},
55-
{"INTC10CB", 0},
56-
{"", 0},
47+
{ "INT33D5" },
48+
{ "INTC1051" },
49+
{ "INTC1054" },
50+
{ "INTC1070" },
51+
{ "INTC1076" },
52+
{ "INTC1077" },
53+
{ "INTC1078" },
54+
{ "INTC107B" },
55+
{ "INTC10CB" },
56+
{ "INTC10CC" },
57+
{ }
5758
};
5859
MODULE_DEVICE_TABLE(acpi, intel_hid_ids);
5960

drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,13 @@ static int uncore_event_cpu_online(unsigned int cpu)
146146
{
147147
struct uncore_data *data;
148148
int target;
149+
int ret;
149150

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

155-
/* Use this CPU on this die as a control CPU */
156-
cpumask_set_cpu(cpu, &uncore_cpu_mask);
157-
158156
data = uncore_get_instance(cpu);
159157
if (!data)
160158
return 0;
@@ -163,7 +161,14 @@ static int uncore_event_cpu_online(unsigned int cpu)
163161
data->die_id = topology_die_id(cpu);
164162
data->domain_id = UNCORE_DOMAIN_ID_INVALID;
165163

166-
return uncore_freq_add_entry(data, cpu);
164+
ret = uncore_freq_add_entry(data, cpu);
165+
if (ret)
166+
return ret;
167+
168+
/* Use this CPU on this die as a control CPU */
169+
cpumask_set_cpu(cpu, &uncore_cpu_mask);
170+
171+
return 0;
167172
}
168173

169174
static int uncore_event_cpu_offline(unsigned int cpu)

0 commit comments

Comments
 (0)