mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
platform-drivers-x86 for v6.17-2
Fixes and New HW Support: - amd/hsmp: - Ensure sock->metric_tbl_addr is non-NULL - Register driver even if hwmon registration fails - amd/pmc: Drop SMU F/W match for Cezanne - dell-smbios-wmi: Separate "priority" from WMI device ID - hp-wmi: mark Victus 16-r1xxx for Victus s fan and thermal profile support - intel-uncore-freq: Check write blocked for efficiency latency control The following is an automated shortlog grouped by driver: amd/hsmp: - Ensure sock->metric_tbl_addr is non-NULL - Ensure success even if hwmon registration fails amd: pmc: - Drop SMU F/W match for Cezanne dell-smbios-wmi: - Stop touching WMI device ID hp-wmi: - mark Victus 16-r1xxx for victus_s fan and thermal profile support intel-uncore-freq: - Check write blocked for ELC -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCaKhs0wAKCRBZrE9hU+XO MQOXAP4zJofX7KXdbIqCpAdlL+zbdDKichzyZG36u+BKdOn8VQEArbQaZoHEq/05 ReoDwmIWS7KWgcbXkZxlwkWYbrOLpwM= =ZB4H -----END PGP SIGNATURE----- Merge tag 'platform-drivers-x86-v6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: - amd/hsmp: - Ensure sock->metric_tbl_addr is non-NULL - Register driver even if hwmon registration fails - amd/pmc: Drop SMU F/W match for Cezanne - dell-smbios-wmi: Separate "priority" from WMI device ID - hp-wmi: mark Victus 16-r1xxx for Victus s fan and thermal profile support - intel-uncore-freq: Check write blocked for efficiency latency control * tag 'platform-drivers-x86-v6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: hp-wmi: mark Victus 16-r1xxx for victus_s fan and thermal profile support platform/x86/amd/hsmp: Ensure success even if hwmon registration fails platform/x86/amd/hsmp: Ensure sock->metric_tbl_addr is non-NULL platform/x86/intel-uncore-freq: Check write blocked for ELC platform/x86/amd: pmc: Drop SMU F/W match for Cezanne platform/x86: dell-smbios-wmi: Stop touching WMI device ID
This commit is contained in:
commit
272aa18fea
@ -504,7 +504,7 @@ static int init_acpi(struct device *dev)
|
||||
|
||||
dev_set_drvdata(dev, &hsmp_pdev->sock[sock_ind]);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct bin_attribute hsmp_metric_tbl_attr = {
|
||||
|
@ -356,6 +356,11 @@ ssize_t hsmp_metric_tbl_read(struct hsmp_socket *sock, char *buf, size_t size)
|
||||
if (!sock || !buf)
|
||||
return -EINVAL;
|
||||
|
||||
if (!sock->metric_tbl_addr) {
|
||||
dev_err(sock->dev, "Metrics table address not available\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Do not support lseek(), also don't allow more than the size of metric table */
|
||||
if (size != sizeof(struct hsmp_metric_table)) {
|
||||
dev_err(sock->dev, "Wrong buffer size\n");
|
||||
|
@ -28,10 +28,15 @@ static struct quirk_entry quirk_spurious_8042 = {
|
||||
.spurious_8042 = true,
|
||||
};
|
||||
|
||||
static struct quirk_entry quirk_s2idle_spurious_8042 = {
|
||||
.s2idle_bug_mmio = FCH_PM_BASE + FCH_PM_SCRATCH,
|
||||
.spurious_8042 = true,
|
||||
};
|
||||
|
||||
static const struct dmi_system_id fwbug_list[] = {
|
||||
{
|
||||
.ident = "L14 Gen2 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20X5"),
|
||||
@ -39,7 +44,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "T14s Gen2 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20XF"),
|
||||
@ -47,7 +52,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "X13 Gen2 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20XH"),
|
||||
@ -55,7 +60,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "T14 Gen2 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20XK"),
|
||||
@ -63,7 +68,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "T14 Gen1 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20UD"),
|
||||
@ -71,7 +76,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "T14 Gen1 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20UE"),
|
||||
@ -79,7 +84,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "T14s Gen1 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20UH"),
|
||||
@ -87,7 +92,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "T14s Gen1 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20UJ"),
|
||||
@ -95,7 +100,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "P14s Gen1 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "20Y1"),
|
||||
@ -103,7 +108,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "P14s Gen2 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21A0"),
|
||||
@ -111,7 +116,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "P14s Gen2 AMD",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21A1"),
|
||||
@ -152,7 +157,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad 1 14AMN7",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82VF"),
|
||||
@ -160,7 +165,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad 1 15AMN7",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82VG"),
|
||||
@ -168,7 +173,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad 1 15AMN7",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82X5"),
|
||||
@ -176,7 +181,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad Slim 3 14AMN8",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82XN"),
|
||||
@ -184,7 +189,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
},
|
||||
{
|
||||
.ident = "IdeaPad Slim 3 15AMN8",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82XQ"),
|
||||
@ -193,7 +198,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
/* https://gitlab.freedesktop.org/drm/amd/-/issues/4434 */
|
||||
{
|
||||
.ident = "Lenovo Yoga 6 13ALC6",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "82ND"),
|
||||
@ -202,7 +207,7 @@ static const struct dmi_system_id fwbug_list[] = {
|
||||
/* https://gitlab.freedesktop.org/drm/amd/-/issues/2684 */
|
||||
{
|
||||
.ident = "HP Laptop 15s-eq2xxx",
|
||||
.driver_data = &quirk_s2idle_bug,
|
||||
.driver_data = &quirk_s2idle_spurious_8042,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HP Laptop 15s-eq2xxx"),
|
||||
@ -285,6 +290,16 @@ void amd_pmc_quirks_init(struct amd_pmc_dev *dev)
|
||||
{
|
||||
const struct dmi_system_id *dmi_id;
|
||||
|
||||
/*
|
||||
* IRQ1 may cause an interrupt during resume even without a keyboard
|
||||
* press.
|
||||
*
|
||||
* Affects Renoir, Cezanne and Barcelo SoCs
|
||||
*
|
||||
* A solution is available in PMFW 64.66.0, but it must be activated by
|
||||
* SBIOS. If SBIOS is known to have the fix a quirk can be added for
|
||||
* a given system to avoid workaround.
|
||||
*/
|
||||
if (dev->cpu_id == AMD_CPU_ID_CZN)
|
||||
dev->disable_8042_wakeup = true;
|
||||
|
||||
@ -295,6 +310,5 @@ void amd_pmc_quirks_init(struct amd_pmc_dev *dev)
|
||||
if (dev->quirks->s2idle_bug_mmio)
|
||||
pr_info("Using s2idle quirk to avoid %s platform firmware bug\n",
|
||||
dmi_id->ident);
|
||||
if (dev->quirks->spurious_8042)
|
||||
dev->disable_8042_wakeup = true;
|
||||
dev->disable_8042_wakeup = dev->quirks->spurious_8042;
|
||||
}
|
||||
|
@ -530,19 +530,6 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev)
|
||||
static int amd_pmc_wa_irq1(struct amd_pmc_dev *pdev)
|
||||
{
|
||||
struct device *d;
|
||||
int rc;
|
||||
|
||||
/* cezanne platform firmware has a fix in 64.66.0 */
|
||||
if (pdev->cpu_id == AMD_CPU_ID_CZN) {
|
||||
if (!pdev->major) {
|
||||
rc = amd_pmc_get_smu_version(pdev);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (pdev->major > 64 || (pdev->major == 64 && pdev->minor > 65))
|
||||
return 0;
|
||||
}
|
||||
|
||||
d = bus_find_device_by_name(&serio_bus, NULL, "serio0");
|
||||
if (!d)
|
||||
|
@ -39,6 +39,7 @@ struct token_sysfs_data {
|
||||
struct smbios_device {
|
||||
struct list_head list;
|
||||
struct device *device;
|
||||
int priority;
|
||||
int (*call_fn)(struct calling_interface_buffer *arg);
|
||||
};
|
||||
|
||||
@ -145,7 +146,7 @@ int dell_smbios_error(int value)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dell_smbios_error);
|
||||
|
||||
int dell_smbios_register_device(struct device *d, void *call_fn)
|
||||
int dell_smbios_register_device(struct device *d, int priority, void *call_fn)
|
||||
{
|
||||
struct smbios_device *priv;
|
||||
|
||||
@ -154,6 +155,7 @@ int dell_smbios_register_device(struct device *d, void *call_fn)
|
||||
return -ENOMEM;
|
||||
get_device(d);
|
||||
priv->device = d;
|
||||
priv->priority = priority;
|
||||
priv->call_fn = call_fn;
|
||||
mutex_lock(&smbios_mutex);
|
||||
list_add_tail(&priv->list, &smbios_device_list);
|
||||
@ -292,28 +294,25 @@ EXPORT_SYMBOL_GPL(dell_smbios_call_filter);
|
||||
|
||||
int dell_smbios_call(struct calling_interface_buffer *buffer)
|
||||
{
|
||||
int (*call_fn)(struct calling_interface_buffer *) = NULL;
|
||||
struct device *selected_dev = NULL;
|
||||
struct smbios_device *selected = NULL;
|
||||
struct smbios_device *priv;
|
||||
int ret;
|
||||
|
||||
mutex_lock(&smbios_mutex);
|
||||
list_for_each_entry(priv, &smbios_device_list, list) {
|
||||
if (!selected_dev || priv->device->id >= selected_dev->id) {
|
||||
dev_dbg(priv->device, "Trying device ID: %d\n",
|
||||
priv->device->id);
|
||||
call_fn = priv->call_fn;
|
||||
selected_dev = priv->device;
|
||||
if (!selected || priv->priority >= selected->priority) {
|
||||
dev_dbg(priv->device, "Trying device ID: %d\n", priv->priority);
|
||||
selected = priv;
|
||||
}
|
||||
}
|
||||
|
||||
if (!selected_dev) {
|
||||
if (!selected) {
|
||||
ret = -ENODEV;
|
||||
pr_err("No dell-smbios drivers are loaded\n");
|
||||
goto out_smbios_call;
|
||||
}
|
||||
|
||||
ret = call_fn(buffer);
|
||||
ret = selected->call_fn(buffer);
|
||||
|
||||
out_smbios_call:
|
||||
mutex_unlock(&smbios_mutex);
|
||||
|
@ -125,8 +125,7 @@ int init_dell_smbios_smm(void)
|
||||
if (ret)
|
||||
goto fail_platform_device_add;
|
||||
|
||||
ret = dell_smbios_register_device(&platform_device->dev,
|
||||
&dell_smbios_smm_call);
|
||||
ret = dell_smbios_register_device(&platform_device->dev, 0, &dell_smbios_smm_call);
|
||||
if (ret)
|
||||
goto fail_register;
|
||||
|
||||
|
@ -264,9 +264,7 @@ static int dell_smbios_wmi_probe(struct wmi_device *wdev, const void *context)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* ID is used by dell-smbios to set priority of drivers */
|
||||
wdev->dev.id = 1;
|
||||
ret = dell_smbios_register_device(&wdev->dev, &dell_smbios_wmi_call);
|
||||
ret = dell_smbios_register_device(&wdev->dev, 1, &dell_smbios_wmi_call);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -64,7 +64,7 @@ struct calling_interface_structure {
|
||||
struct calling_interface_token tokens[];
|
||||
} __packed;
|
||||
|
||||
int dell_smbios_register_device(struct device *d, void *call_fn);
|
||||
int dell_smbios_register_device(struct device *d, int priority, void *call_fn);
|
||||
void dell_smbios_unregister_device(struct device *d);
|
||||
|
||||
int dell_smbios_error(int value);
|
||||
|
@ -92,9 +92,9 @@ static const char * const victus_thermal_profile_boards[] = {
|
||||
"8A25"
|
||||
};
|
||||
|
||||
/* DMI Board names of Victus 16-s1000 laptops */
|
||||
/* DMI Board names of Victus 16-r1000 and Victus 16-s1000 laptops */
|
||||
static const char * const victus_s_thermal_profile_boards[] = {
|
||||
"8C9C"
|
||||
"8C99", "8C9C"
|
||||
};
|
||||
|
||||
enum hp_wmi_radio {
|
||||
|
@ -192,9 +192,14 @@ static int uncore_read_control_freq(struct uncore_data *data, unsigned int *valu
|
||||
static int write_eff_lat_ctrl(struct uncore_data *data, unsigned int val, enum uncore_index index)
|
||||
{
|
||||
struct tpmi_uncore_cluster_info *cluster_info;
|
||||
struct tpmi_uncore_struct *uncore_root;
|
||||
u64 control;
|
||||
|
||||
cluster_info = container_of(data, struct tpmi_uncore_cluster_info, uncore_data);
|
||||
uncore_root = cluster_info->uncore_root;
|
||||
|
||||
if (uncore_root->write_blocked)
|
||||
return -EPERM;
|
||||
|
||||
if (cluster_info->root_domain)
|
||||
return -ENODATA;
|
||||
|
Loading…
Reference in New Issue
Block a user