mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-03 17:50:04 +00:00
platform-drivers-x86 for v6.14-5
Fixes and new HW support:
- 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
The following is an automated shortlog grouped by driver:
amd/pmf:
- fix cleanup in amd_pmf_init_smart_pc()
amd: pmf:
- Fix missing hidden options for Smart PC
MAINTAINERS:
- Update Ike Panhc's email address
surface: aggregator_registry:
- Add Support for Surface Pro 11
-----BEGIN PGP SIGNATURE-----
iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCZ9Q9DAAKCRBZrE9hU+XO
MZE3AP9GnIgzXK1dFbuorGfNCHMol4TbR6oANflMBPvORWE54QD/XWwongTvUpFU
cgwVSasJb2fLso/nyBlVmYeKE7h8qAk=
=6Une
-----END PGP SIGNATURE-----
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:
commit
83158b21ae
1
.mailmap
1
.mailmap
@ -281,6 +281,7 @@ Henrik Rydberg <rydberg@bitmath.org>
|
||||
Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Huacai Chen <chenhuacai@kernel.org> <chenhc@lemote.com>
|
||||
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@citi.umich.edu>
|
||||
Jacob Shin <Jacob.Shin@amd.com>
|
||||
|
||||
@ -11141,7 +11141,7 @@ S: Maintained
|
||||
F: drivers/i2c/busses/i2c-icy.c
|
||||
|
||||
IDEAPAD LAPTOP EXTRAS DRIVER
|
||||
M: Ike Panhc <ike.pan@canonical.com>
|
||||
M: Ike Panhc <ikepanhc@gmail.com>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://launchpad.net/ideapad-laptop
|
||||
|
||||
@ -371,7 +371,7 @@ static const struct software_node *ssam_node_group_sp8[] = {
|
||||
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[] = {
|
||||
&ssam_node_root,
|
||||
&ssam_node_hub_kip,
|
||||
@ -430,6 +430,9 @@ static const struct acpi_device_id ssam_platform_hub_acpi_match[] = {
|
||||
/* Surface Pro 10 */
|
||||
{ "MSHW0510", (unsigned long)ssam_node_group_sp9 },
|
||||
|
||||
/* Surface Pro 11 */
|
||||
{ "MSHW0583", (unsigned long)ssam_node_group_sp9 },
|
||||
|
||||
/* Surface Book 2 */
|
||||
{ "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) {
|
||||
case PLATFORM_PROFILE_PERFORMANCE:
|
||||
case PLATFORM_PROFILE_BALANCED_PERFORMANCE:
|
||||
val = TA_BEST_PERFORMANCE;
|
||||
break;
|
||||
case PLATFORM_PROFILE_BALANCED:
|
||||
val = TA_BETTER_PERFORMANCE;
|
||||
break;
|
||||
case PLATFORM_PROFILE_LOW_POWER:
|
||||
case PLATFORM_PROFILE_QUIET:
|
||||
val = TA_BEST_BATTERY;
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -510,18 +510,18 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
||||
|
||||
ret = amd_pmf_set_dram_addr(dev, true);
|
||||
if (ret)
|
||||
goto error;
|
||||
goto err_cancel_work;
|
||||
|
||||
dev->policy_base = devm_ioremap_resource(dev->dev, dev->res);
|
||||
if (IS_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);
|
||||
if (!dev->policy_buf) {
|
||||
ret = -ENOMEM;
|
||||
goto error;
|
||||
goto err_free_dram_buf;
|
||||
}
|
||||
|
||||
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);
|
||||
if (!dev->prev_data) {
|
||||
ret = -ENOMEM;
|
||||
goto error;
|
||||
goto err_free_policy;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(amd_pmf_ta_uuid); i++) {
|
||||
ret = amd_pmf_tee_init(dev, &amd_pmf_ta_uuid[i]);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_free_prev_data;
|
||||
|
||||
ret = amd_pmf_start_policy_engine(dev);
|
||||
switch (ret) {
|
||||
@ -550,27 +550,41 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
||||
status = false;
|
||||
break;
|
||||
default:
|
||||
goto error;
|
||||
ret = -EINVAL;
|
||||
amd_pmf_tee_deinit(dev);
|
||||
goto err_free_prev_data;
|
||||
}
|
||||
|
||||
if (status)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!status && !pb_side_load)
|
||||
goto error;
|
||||
if (!status && !pb_side_load) {
|
||||
ret = -EINVAL;
|
||||
goto err_free_prev_data;
|
||||
}
|
||||
|
||||
if (pb_side_load)
|
||||
amd_pmf_open_pb(dev, dev->dbgfs_dir);
|
||||
|
||||
ret = amd_pmf_register_input_device(dev);
|
||||
if (ret)
|
||||
goto error;
|
||||
goto err_pmf_remove_pb;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
amd_pmf_deinit_smart_pc(dev);
|
||||
err_pmf_remove_pb:
|
||||
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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user