mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
Merge tag 'platform-drivers-x86-v6.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Ilpo Järvinen:
"Fixes and new HW support.
The diff is a bit larger than I'd prefer at this point due to
unwinding the amd/pmf driver's error handling properly instead of
calling a deinit function that was a can full of worms.
Summary:
- amd/pmf:
- Fix error handling in amd_pmf_init_smart_pc()
- Fix missing hidden options for Smart PC
- surface: aggregator_registry: Add Support for Surface Pro 11"
* tag 'platform-drivers-x86-v6.14-5' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
MAINTAINERS: Update Ike Panhc's email address
platform/x86/amd: pmf: Fix missing hidden options for Smart PC
platform/surface: aggregator_registry: Add Support for Surface Pro 11
platform/x86/amd/pmf: fix cleanup in amd_pmf_init_smart_pc()
This commit is contained in:
1
.mailmap
1
.mailmap
@@ -281,6 +281,7 @@ Henrik Rydberg <rydberg@bitmath.org>
|
|||||||
Herbert Xu <herbert@gondor.apana.org.au>
|
Herbert Xu <herbert@gondor.apana.org.au>
|
||||||
Huacai Chen <chenhuacai@kernel.org> <chenhc@lemote.com>
|
Huacai Chen <chenhuacai@kernel.org> <chenhc@lemote.com>
|
||||||
Huacai Chen <chenhuacai@kernel.org> <chenhuacai@loongson.cn>
|
Huacai Chen <chenhuacai@kernel.org> <chenhuacai@loongson.cn>
|
||||||
|
Ike Panhc <ikepanhc@gmail.com> <ike.pan@canonical.com>
|
||||||
J. Bruce Fields <bfields@fieldses.org> <bfields@redhat.com>
|
J. Bruce Fields <bfields@fieldses.org> <bfields@redhat.com>
|
||||||
J. Bruce Fields <bfields@fieldses.org> <bfields@citi.umich.edu>
|
J. Bruce Fields <bfields@fieldses.org> <bfields@citi.umich.edu>
|
||||||
Jacob Shin <Jacob.Shin@amd.com>
|
Jacob Shin <Jacob.Shin@amd.com>
|
||||||
|
|||||||
@@ -11141,7 +11141,7 @@ S: Maintained
|
|||||||
F: drivers/i2c/busses/i2c-icy.c
|
F: drivers/i2c/busses/i2c-icy.c
|
||||||
|
|
||||||
IDEAPAD LAPTOP EXTRAS DRIVER
|
IDEAPAD LAPTOP EXTRAS DRIVER
|
||||||
M: Ike Panhc <ike.pan@canonical.com>
|
M: Ike Panhc <ikepanhc@gmail.com>
|
||||||
L: platform-driver-x86@vger.kernel.org
|
L: platform-driver-x86@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
W: http://launchpad.net/ideapad-laptop
|
W: http://launchpad.net/ideapad-laptop
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ static const struct software_node *ssam_node_group_sp8[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Devices for Surface Pro 9 (Intel/x86) and 10 */
|
/* Devices for Surface Pro 9, 10 and 11 (Intel/x86) */
|
||||||
static const struct software_node *ssam_node_group_sp9[] = {
|
static const struct software_node *ssam_node_group_sp9[] = {
|
||||||
&ssam_node_root,
|
&ssam_node_root,
|
||||||
&ssam_node_hub_kip,
|
&ssam_node_hub_kip,
|
||||||
@@ -430,6 +430,9 @@ static const struct acpi_device_id ssam_platform_hub_acpi_match[] = {
|
|||||||
/* Surface Pro 10 */
|
/* Surface Pro 10 */
|
||||||
{ "MSHW0510", (unsigned long)ssam_node_group_sp9 },
|
{ "MSHW0510", (unsigned long)ssam_node_group_sp9 },
|
||||||
|
|
||||||
|
/* Surface Pro 11 */
|
||||||
|
{ "MSHW0583", (unsigned long)ssam_node_group_sp9 },
|
||||||
|
|
||||||
/* Surface Book 2 */
|
/* Surface Book 2 */
|
||||||
{ "MSHW0107", (unsigned long)ssam_node_group_gen5 },
|
{ "MSHW0107", (unsigned long)ssam_node_group_gen5 },
|
||||||
|
|
||||||
|
|||||||
@@ -219,12 +219,14 @@ static int amd_pmf_get_slider_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_
|
|||||||
|
|
||||||
switch (dev->current_profile) {
|
switch (dev->current_profile) {
|
||||||
case PLATFORM_PROFILE_PERFORMANCE:
|
case PLATFORM_PROFILE_PERFORMANCE:
|
||||||
|
case PLATFORM_PROFILE_BALANCED_PERFORMANCE:
|
||||||
val = TA_BEST_PERFORMANCE;
|
val = TA_BEST_PERFORMANCE;
|
||||||
break;
|
break;
|
||||||
case PLATFORM_PROFILE_BALANCED:
|
case PLATFORM_PROFILE_BALANCED:
|
||||||
val = TA_BETTER_PERFORMANCE;
|
val = TA_BETTER_PERFORMANCE;
|
||||||
break;
|
break;
|
||||||
case PLATFORM_PROFILE_LOW_POWER:
|
case PLATFORM_PROFILE_LOW_POWER:
|
||||||
|
case PLATFORM_PROFILE_QUIET:
|
||||||
val = TA_BEST_BATTERY;
|
val = TA_BEST_BATTERY;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -510,18 +510,18 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
|||||||
|
|
||||||
ret = amd_pmf_set_dram_addr(dev, true);
|
ret = amd_pmf_set_dram_addr(dev, true);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto err_cancel_work;
|
||||||
|
|
||||||
dev->policy_base = devm_ioremap_resource(dev->dev, dev->res);
|
dev->policy_base = devm_ioremap_resource(dev->dev, dev->res);
|
||||||
if (IS_ERR(dev->policy_base)) {
|
if (IS_ERR(dev->policy_base)) {
|
||||||
ret = PTR_ERR(dev->policy_base);
|
ret = PTR_ERR(dev->policy_base);
|
||||||
goto error;
|
goto err_free_dram_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev->policy_buf = kzalloc(dev->policy_sz, GFP_KERNEL);
|
dev->policy_buf = kzalloc(dev->policy_sz, GFP_KERNEL);
|
||||||
if (!dev->policy_buf) {
|
if (!dev->policy_buf) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto error;
|
goto err_free_dram_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz);
|
memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz);
|
||||||
@@ -531,13 +531,13 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
|||||||
dev->prev_data = kzalloc(sizeof(*dev->prev_data), GFP_KERNEL);
|
dev->prev_data = kzalloc(sizeof(*dev->prev_data), GFP_KERNEL);
|
||||||
if (!dev->prev_data) {
|
if (!dev->prev_data) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto error;
|
goto err_free_policy;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(amd_pmf_ta_uuid); i++) {
|
for (i = 0; i < ARRAY_SIZE(amd_pmf_ta_uuid); i++) {
|
||||||
ret = amd_pmf_tee_init(dev, &amd_pmf_ta_uuid[i]);
|
ret = amd_pmf_tee_init(dev, &amd_pmf_ta_uuid[i]);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto err_free_prev_data;
|
||||||
|
|
||||||
ret = amd_pmf_start_policy_engine(dev);
|
ret = amd_pmf_start_policy_engine(dev);
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
@@ -550,27 +550,41 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
|||||||
status = false;
|
status = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto error;
|
ret = -EINVAL;
|
||||||
|
amd_pmf_tee_deinit(dev);
|
||||||
|
goto err_free_prev_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!status && !pb_side_load)
|
if (!status && !pb_side_load) {
|
||||||
goto error;
|
ret = -EINVAL;
|
||||||
|
goto err_free_prev_data;
|
||||||
|
}
|
||||||
|
|
||||||
if (pb_side_load)
|
if (pb_side_load)
|
||||||
amd_pmf_open_pb(dev, dev->dbgfs_dir);
|
amd_pmf_open_pb(dev, dev->dbgfs_dir);
|
||||||
|
|
||||||
ret = amd_pmf_register_input_device(dev);
|
ret = amd_pmf_register_input_device(dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto err_pmf_remove_pb;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
err_pmf_remove_pb:
|
||||||
amd_pmf_deinit_smart_pc(dev);
|
if (pb_side_load && dev->esbin)
|
||||||
|
amd_pmf_remove_pb(dev);
|
||||||
|
amd_pmf_tee_deinit(dev);
|
||||||
|
err_free_prev_data:
|
||||||
|
kfree(dev->prev_data);
|
||||||
|
err_free_policy:
|
||||||
|
kfree(dev->policy_buf);
|
||||||
|
err_free_dram_buf:
|
||||||
|
kfree(dev->buf);
|
||||||
|
err_cancel_work:
|
||||||
|
cancel_delayed_work_sync(&dev->pb_work);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user