Skip to content

Commit 8499899

Browse files
committed
Merge tag 'platform-drivers-x86-v6.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform drivers fixes from Ilpo Järvinen: "Fixes: - amd/pmf: Fix STT limits - asus-laptop: Fix an uninitialized variable - intel_pmc_ipc: Allow building without ACPI - mlxbf-bootctl: Use sysfs_emit_at() in secure_boot_fuse_state_show() - msi-wmi-platform: Add locking to workaround ACPI firmware bug New HW support: - alienware-wmi-wmax: - Extended thermal control support to: - Alienware Area-51m R2 - Alienware m16 R1 - Alienware m16 R2 - Dell G16 7630 - Dell G5 5505 SE - G-Mode support to Alienware m16 R1 - x86-android-tablets: Add Vexia Edu Atla 10 tablet 5V data" * tag 'platform-drivers-x86-v6.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: msi-wmi-platform: Workaround a ACPI firmware bug platform/x86: msi-wmi-platform: Rename "data" variable platform/x86: alienware-wmi-wmax: Extend support to more laptops platform/x86: alienware-wmi-wmax: Add G-Mode support to Alienware m16 R1 platform/x86: amd: pmf: Fix STT limits mlxbf-bootctl: use sysfs_emit_at() in secure_boot_fuse_state_show() platform/x86: x86-android-tablets: Add Vexia Edu Atla 10 tablet 5V data platform/x86: x86-android-tablets: Add "9v" to Vexia EDU ATLA 10 tablet symbols asus-laptop: Fix an uninitialized variable platform/x86: intel_pmc_ipc: add option to build without ACPI
2 parents 7adf8b1 + baf2f2c commit 8499899

File tree

15 files changed

+267
-87
lines changed

15 files changed

+267
-87
lines changed

Documentation/wmi/devices/msi-wmi-platform.rst

+4
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ input data, the meaning of which depends on the subfeature being accessed.
138138
The output buffer contains a single byte which signals success or failure (``0x00`` on failure)
139139
and 31 bytes of output data, the meaning if which depends on the subfeature being accessed.
140140

141+
.. note::
142+
The ACPI control method responsible for handling the WMI method calls is not thread-safe.
143+
This is a firmware bug that needs to be handled inside the driver itself.
144+
141145
WMI method Get_EC()
142146
-------------------
143147

drivers/platform/mellanox/mlxbf-bootctl.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ static ssize_t secure_boot_fuse_state_show(struct device *dev,
333333
else
334334
status = valid ? "Invalid" : "Free";
335335
}
336-
buf_len += sysfs_emit(buf + buf_len, "%d:%s ", key, status);
336+
buf_len += sysfs_emit_at(buf, buf_len, "%d:%s ", key, status);
337337
}
338-
buf_len += sysfs_emit(buf + buf_len, "\n");
338+
buf_len += sysfs_emit_at(buf, buf_len, "\n");
339339

340340
return buf_len;
341341
}

drivers/platform/x86/amd/pmf/auto-mode.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ static void amd_pmf_set_automode(struct amd_pmf_dev *dev, int idx,
120120
amd_pmf_send_cmd(dev, SET_SPPT_APU_ONLY, false, pwr_ctrl->sppt_apu_only, NULL);
121121
amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, pwr_ctrl->stt_min, NULL);
122122
amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
123-
pwr_ctrl->stt_skin_temp[STT_TEMP_APU], NULL);
123+
fixp_q88_fromint(pwr_ctrl->stt_skin_temp[STT_TEMP_APU]), NULL);
124124
amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
125-
pwr_ctrl->stt_skin_temp[STT_TEMP_HS2], NULL);
125+
fixp_q88_fromint(pwr_ctrl->stt_skin_temp[STT_TEMP_HS2]), NULL);
126126

127127
if (is_apmf_func_supported(dev, APMF_FUNC_SET_FAN_IDX))
128128
apmf_update_fan_idx(dev, config_store.mode_set[idx].fan_control.manual,

drivers/platform/x86/amd/pmf/cnqf.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ static int amd_pmf_set_cnqf(struct amd_pmf_dev *dev, int src, int idx,
8181
amd_pmf_send_cmd(dev, SET_SPPT, false, pc->sppt, NULL);
8282
amd_pmf_send_cmd(dev, SET_SPPT_APU_ONLY, false, pc->sppt_apu_only, NULL);
8383
amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false, pc->stt_min, NULL);
84-
amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false, pc->stt_skin_temp[STT_TEMP_APU],
85-
NULL);
86-
amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false, pc->stt_skin_temp[STT_TEMP_HS2],
87-
NULL);
84+
amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
85+
fixp_q88_fromint(pc->stt_skin_temp[STT_TEMP_APU]), NULL);
86+
amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
87+
fixp_q88_fromint(pc->stt_skin_temp[STT_TEMP_HS2]), NULL);
8888

8989
if (is_apmf_func_supported(dev, APMF_FUNC_SET_FAN_IDX))
9090
apmf_update_fan_idx(dev,

drivers/platform/x86/amd/pmf/core.c

+14
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,20 @@ static void __maybe_unused amd_pmf_dump_registers(struct amd_pmf_dev *dev)
176176
dev_dbg(dev->dev, "AMD_PMF_REGISTER_MESSAGE:%x\n", value);
177177
}
178178

179+
/**
180+
* fixp_q88_fromint: Convert integer to Q8.8
181+
* @val: input value
182+
*
183+
* Converts an integer into binary fixed point format where 8 bits
184+
* are used for integer and 8 bits are used for the decimal.
185+
*
186+
* Return: unsigned integer converted to Q8.8 format
187+
*/
188+
u32 fixp_q88_fromint(u32 val)
189+
{
190+
return val << 8;
191+
}
192+
179193
int amd_pmf_send_cmd(struct amd_pmf_dev *dev, u8 message, bool get, u32 arg, u32 *data)
180194
{
181195
int rc;

drivers/platform/x86/amd/pmf/pmf.h

+1
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,7 @@ int apmf_install_handler(struct amd_pmf_dev *pmf_dev);
777777
int apmf_os_power_slider_update(struct amd_pmf_dev *dev, u8 flag);
778778
int amd_pmf_set_dram_addr(struct amd_pmf_dev *dev, bool alloc_buffer);
779779
int amd_pmf_notify_sbios_heartbeat_event_v2(struct amd_pmf_dev *dev, u8 flag);
780+
u32 fixp_q88_fromint(u32 val);
780781

781782
/* SPS Layer */
782783
int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf);

drivers/platform/x86/amd/pmf/sps.c

+8-4
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,11 @@ static void amd_pmf_update_slider_v2(struct amd_pmf_dev *dev, int idx)
198198
amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false,
199199
apts_config_store.val[idx].stt_min_limit, NULL);
200200
amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
201-
apts_config_store.val[idx].stt_skin_temp_limit_apu, NULL);
201+
fixp_q88_fromint(apts_config_store.val[idx].stt_skin_temp_limit_apu),
202+
NULL);
202203
amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
203-
apts_config_store.val[idx].stt_skin_temp_limit_hs2, NULL);
204+
fixp_q88_fromint(apts_config_store.val[idx].stt_skin_temp_limit_hs2),
205+
NULL);
204206
}
205207

206208
void amd_pmf_update_slider(struct amd_pmf_dev *dev, bool op, int idx,
@@ -217,9 +219,11 @@ void amd_pmf_update_slider(struct amd_pmf_dev *dev, bool op, int idx,
217219
amd_pmf_send_cmd(dev, SET_STT_MIN_LIMIT, false,
218220
config_store.prop[src][idx].stt_min, NULL);
219221
amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
220-
config_store.prop[src][idx].stt_skin_temp[STT_TEMP_APU], NULL);
222+
fixp_q88_fromint(config_store.prop[src][idx].stt_skin_temp[STT_TEMP_APU]),
223+
NULL);
221224
amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
222-
config_store.prop[src][idx].stt_skin_temp[STT_TEMP_HS2], NULL);
225+
fixp_q88_fromint(config_store.prop[src][idx].stt_skin_temp[STT_TEMP_HS2]),
226+
NULL);
223227
} else if (op == SLIDER_OP_GET) {
224228
amd_pmf_send_cmd(dev, GET_SPL, true, ARG_NONE, &table->prop[src][idx].spl);
225229
amd_pmf_send_cmd(dev, GET_FPPT, true, ARG_NONE, &table->prop[src][idx].fppt);

drivers/platform/x86/amd/pmf/tee-if.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,17 @@ static void amd_pmf_apply_policies(struct amd_pmf_dev *dev, struct ta_pmf_enact_
123123

124124
case PMF_POLICY_STT_SKINTEMP_APU:
125125
if (dev->prev_data->stt_skintemp_apu != val) {
126-
amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false, val, NULL);
126+
amd_pmf_send_cmd(dev, SET_STT_LIMIT_APU, false,
127+
fixp_q88_fromint(val), NULL);
127128
dev_dbg(dev->dev, "update STT_SKINTEMP_APU: %u\n", val);
128129
dev->prev_data->stt_skintemp_apu = val;
129130
}
130131
break;
131132

132133
case PMF_POLICY_STT_SKINTEMP_HS2:
133134
if (dev->prev_data->stt_skintemp_hs2 != val) {
134-
amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false, val, NULL);
135+
amd_pmf_send_cmd(dev, SET_STT_LIMIT_HS2, false,
136+
fixp_q88_fromint(val), NULL);
135137
dev_dbg(dev->dev, "update STT_SKINTEMP_HS2: %u\n", val);
136138
dev->prev_data->stt_skintemp_hs2 = val;
137139
}

drivers/platform/x86/asus-laptop.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,14 @@ static int asus_pega_lucid_set(struct asus_laptop *asus, int unit, bool enable)
426426

427427
static int pega_acc_axis(struct asus_laptop *asus, int curr, char *method)
428428
{
429+
unsigned long long val = (unsigned long long)curr;
430+
acpi_status status;
429431
int i, delta;
430-
unsigned long long val;
431-
for (i = 0; i < PEGA_ACC_RETRIES; i++) {
432-
acpi_evaluate_integer(asus->handle, method, NULL, &val);
433432

433+
for (i = 0; i < PEGA_ACC_RETRIES; i++) {
434+
status = acpi_evaluate_integer(asus->handle, method, NULL, &val);
435+
if (ACPI_FAILURE(status))
436+
continue;
434437
/* The output is noisy. From reading the ASL
435438
* dissassembly, timeout errors are returned with 1's
436439
* in the high word, and the lack of locking around

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

+48
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,36 @@ static struct awcc_quirks generic_quirks = {
6161
static struct awcc_quirks empty_quirks;
6262

6363
static const struct dmi_system_id awcc_dmi_table[] __initconst = {
64+
{
65+
.ident = "Alienware Area-51m R2",
66+
.matches = {
67+
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
68+
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware Area-51m R2"),
69+
},
70+
.driver_data = &generic_quirks,
71+
},
72+
{
73+
.ident = "Alienware m16 R1",
74+
.matches = {
75+
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
76+
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1"),
77+
},
78+
.driver_data = &g_series_quirks,
79+
},
6480
{
6581
.ident = "Alienware m16 R1 AMD",
6682
.matches = {
6783
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
6884
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"),
6985
},
86+
.driver_data = &g_series_quirks,
87+
},
88+
{
89+
.ident = "Alienware m16 R2",
90+
.matches = {
91+
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
92+
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R2"),
93+
},
7094
.driver_data = &generic_quirks,
7195
},
7296
{
@@ -93,6 +117,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = {
93117
},
94118
.driver_data = &generic_quirks,
95119
},
120+
{
121+
.ident = "Alienware x15 R2",
122+
.matches = {
123+
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
124+
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R2"),
125+
},
126+
.driver_data = &generic_quirks,
127+
},
96128
{
97129
.ident = "Alienware x17 R2",
98130
.matches = {
@@ -125,6 +157,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = {
125157
},
126158
.driver_data = &g_series_quirks,
127159
},
160+
{
161+
.ident = "Dell Inc. G16 7630",
162+
.matches = {
163+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
164+
DMI_MATCH(DMI_PRODUCT_NAME, "Dell G16 7630"),
165+
},
166+
.driver_data = &g_series_quirks,
167+
},
128168
{
129169
.ident = "Dell Inc. G3 3500",
130170
.matches = {
@@ -149,6 +189,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = {
149189
},
150190
.driver_data = &g_series_quirks,
151191
},
192+
{
193+
.ident = "Dell Inc. G5 5505",
194+
.matches = {
195+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
196+
DMI_MATCH(DMI_PRODUCT_NAME, "G5 5505"),
197+
},
198+
.driver_data = &g_series_quirks,
199+
},
152200
};
153201

154202
enum WMAX_THERMAL_INFORMATION_OPERATIONS {

0 commit comments

Comments
 (0)