Merge tag 'platform-drivers-x86-v6.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen:

- acer-wmi:
- Extend support for Acer Nitro AN515-58
- Fix missing capability check

- amd/wbrf: Fix memory leak in wbrf_record()

- asus-armoury:
- Fix GA403U* matching
- Fix FA608UM TDP data
- Add many models

- asus-wmi: Move OOBE presence check outside deprecation ifdef

- hp-bioscfg:
- Fix kernel panic in GET_INSTANCE_ID macro
- Fix kobject warnings for empty attribute names
- Correct GUID to uppercase (lowercase letter prevented autoloading
the module)

- mellanox: Fix SN5640/SN5610 LED platform data

- docs:
- alienware-wmi: Typo fix
- amd_hsmp: Fix document link

* tag 'platform-drivers-x86-v6.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (21 commits)
platform/x86: acer-wmi: Fix missing capability check
platform/x86: acer-wmi: Extend support for Acer Nitro AN515-58
platform/x86: asus-armoury: add support for GA403WW
platform/x86: asus-armoury: keep the list ordered alphabetically
platform/x86: asus-armoury: add support for G835L
platform/x86: asus-armoury: fix ppt data for FA608UM
platform/x86: hp-bioscfg: Fix automatic module loading
platform/x86: hp-bioscfg: Fix kernel panic in GET_INSTANCE_ID macro
platform/x86: hp-bioscfg: Fix kobject warnings for empty attribute names
platform/x86: asus-wmi: fix sending OOBE at probe
platform/x86: asus-armoury: add support for FA617XT
platform/x86: asus-armoury: add support for FA401UV
platform/x86: asus-armoury: add support for GV302XV
platform/x86: asus-armoury: Add power limits for Asus G513QY
platform/x86/amd: Fix memory leak in wbrf_record()
platform/mellanox: Fix SN5640/SN5610 LED platform data
docs: fix PPR for AMD EPYC broken link
docs: alienware-wmi: fix typo
platform/x86: asus-armoury: add support for GA403UV
asus-armoury: fix ppt data for GA403U* renaming to GA403UI
...

+256 -18
+1 -1
Documentation/admin-guide/laptops/alienware-wmi.rst
··· 105 105 106 106 Manual fan control on the other hand, is not exposed directly by the AWCC 107 107 interface. Instead it let's us control a fan `boost` value. This `boost` value 108 - has the following aproximate behavior over the fan pwm: 108 + has the following approximate behavior over the fan pwm: 109 109 110 110 :: 111 111
+2 -2
Documentation/arch/x86/amd_hsmp.rst
··· 14 14 15 15 More details on the interface can be found in chapter 16 16 "7 Host System Management Port (HSMP)" of the family/model PPR 17 - Eg: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/55898_B1_pub_0_50.zip 17 + Eg: https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50 18 18 19 19 20 20 HSMP interface is supported on EPYC line of server CPUs and MI300A (APU). ··· 185 185 186 186 More details on the interface and message definitions can be found in chapter 187 187 "7 Host System Management Port (HSMP)" of the respective family/model PPR 188 - eg: https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/55898_B1_pub_0_50.zip 188 + eg: https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50 189 189 190 190 User space C-APIs are made available by linking against the esmi library, 191 191 which is provided by the E-SMS project https://www.amd.com/en/developer/e-sms.html.
+1 -1
Documentation/misc-devices/amd-sbi.rst
··· 15 15 More details on the interface can be found in chapter 16 16 "5 Advanced Platform Management Link (APML)" of the family/model PPR [1]_. 17 17 18 - .. [1] https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/programmer-references/55898_B1_pub_0_50.zip 18 + .. [1] https://docs.amd.com/v/u/en-US/55898_B1_pub_0_50 19 19 20 20 21 21 SBRMI device
+1 -1
drivers/platform/mellanox/mlx-platform.c
··· 7381 7381 mlxplat_hotplug = &mlxplat_mlxcpld_ng800_hi171_data; 7382 7382 mlxplat_hotplug->deferred_nr = 7383 7383 mlxplat_msn21xx_channels[MLXPLAT_CPLD_GRP_CHNL_NUM - 1]; 7384 - mlxplat_led = &mlxplat_default_ng_led_data; 7384 + mlxplat_led = &mlxplat_xdr_led_data; 7385 7385 mlxplat_regs_io = &mlxplat_default_ng_regs_io_data; 7386 7386 mlxplat_fan = &mlxplat_xdr_fan_data; 7387 7387
+10 -3
drivers/platform/x86/acer-wmi.c
··· 455 455 .mailled = 1, 456 456 }; 457 457 458 + static struct quirk_entry quirk_acer_nitro_an515_58 = { 459 + .predator_v4 = 1, 460 + .pwm = 1, 461 + }; 462 + 458 463 static struct quirk_entry quirk_acer_predator_ph315_53 = { 459 464 .turbo = 1, 460 465 .cpu_fans = 1, ··· 660 655 DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 661 656 DMI_MATCH(DMI_PRODUCT_NAME, "Nitro AN515-58"), 662 657 }, 663 - .driver_data = &quirk_acer_predator_v4, 658 + .driver_data = &quirk_acer_nitro_an515_58, 664 659 }, 665 660 { 666 661 .callback = dmi_matched, ··· 2070 2065 WMID_gaming_set_u64(0x1, ACER_CAP_TURBO_LED); 2071 2066 2072 2067 /* Set FAN mode to auto */ 2073 - WMID_gaming_set_fan_mode(ACER_WMID_FAN_MODE_AUTO); 2068 + if (has_cap(ACER_CAP_TURBO_FAN)) 2069 + WMID_gaming_set_fan_mode(ACER_WMID_FAN_MODE_AUTO); 2074 2070 2075 2071 /* Set OC to normal */ 2076 2072 if (has_cap(ACER_CAP_TURBO_OC)) { ··· 2085 2079 WMID_gaming_set_u64(0x10001, ACER_CAP_TURBO_LED); 2086 2080 2087 2081 /* Set FAN mode to turbo */ 2088 - WMID_gaming_set_fan_mode(ACER_WMID_FAN_MODE_TURBO); 2082 + if (has_cap(ACER_CAP_TURBO_FAN)) 2083 + WMID_gaming_set_fan_mode(ACER_WMID_FAN_MODE_TURBO); 2089 2084 2090 2085 /* Set OC to turbo mode */ 2091 2086 if (has_cap(ACER_CAP_TURBO_OC)) {
+3 -1
drivers/platform/x86/amd/wbrf.c
··· 104 104 obj = acpi_evaluate_dsm(adev->handle, &wifi_acpi_dsm_guid, 105 105 WBRF_REVISION, WBRF_RECORD, &argv4); 106 106 107 - if (!obj) 107 + if (!obj) { 108 + kfree(tmp); 108 109 return -EINVAL; 110 + } 109 111 110 112 if (obj->type != ACPI_TYPE_INTEGER) { 111 113 ret = -EINVAL;
+221 -3
drivers/platform/x86/asus-armoury.h
··· 348 348 static const struct dmi_system_id power_limits[] = { 349 349 { 350 350 .matches = { 351 + DMI_MATCH(DMI_BOARD_NAME, "FA401UV"), 352 + }, 353 + .driver_data = &(struct power_data) { 354 + .ac_data = &(struct power_limits) { 355 + .ppt_pl1_spl_min = 15, 356 + .ppt_pl1_spl_max = 80, 357 + .ppt_pl2_sppt_min = 35, 358 + .ppt_pl2_sppt_max = 80, 359 + .ppt_pl3_fppt_min = 35, 360 + .ppt_pl3_fppt_max = 80, 361 + .nv_dynamic_boost_min = 5, 362 + .nv_dynamic_boost_max = 25, 363 + .nv_temp_target_min = 75, 364 + .nv_temp_target_max = 87, 365 + .nv_tgp_min = 55, 366 + .nv_tgp_max = 75, 367 + }, 368 + .dc_data = &(struct power_limits) { 369 + .ppt_pl1_spl_min = 25, 370 + .ppt_pl1_spl_max = 35, 371 + .ppt_pl2_sppt_min = 31, 372 + .ppt_pl2_sppt_max = 44, 373 + .ppt_pl3_fppt_min = 45, 374 + .ppt_pl3_fppt_max = 65, 375 + .nv_temp_target_min = 75, 376 + .nv_temp_target_max = 87, 377 + }, 378 + }, 379 + }, 380 + { 381 + .matches = { 351 382 DMI_MATCH(DMI_BOARD_NAME, "FA401W"), 352 383 }, 353 384 .driver_data = &(struct power_data) { ··· 611 580 .ppt_pl2_sppt_def = 54, 612 581 .ppt_pl2_sppt_max = 90, 613 582 .ppt_pl3_fppt_min = 35, 614 - .ppt_pl3_fppt_def = 90, 615 - .ppt_pl3_fppt_max = 65, 583 + .ppt_pl3_fppt_def = 65, 584 + .ppt_pl3_fppt_max = 90, 616 585 .nv_dynamic_boost_min = 10, 617 586 .nv_dynamic_boost_max = 15, 618 587 .nv_temp_target_min = 75, ··· 729 698 .ppt_platform_sppt_max = 100, 730 699 .nv_temp_target_min = 75, 731 700 .nv_temp_target_max = 87, 701 + }, 702 + }, 703 + }, 704 + { 705 + .matches = { 706 + DMI_MATCH(DMI_BOARD_NAME, "FA617XT"), 707 + }, 708 + .driver_data = &(struct power_data) { 709 + .ac_data = &(struct power_limits) { 710 + .ppt_apu_sppt_min = 15, 711 + .ppt_apu_sppt_max = 80, 712 + .ppt_platform_sppt_min = 30, 713 + .ppt_platform_sppt_max = 145, 714 + }, 715 + .dc_data = &(struct power_limits) { 716 + .ppt_apu_sppt_min = 25, 717 + .ppt_apu_sppt_max = 35, 718 + .ppt_platform_sppt_min = 45, 719 + .ppt_platform_sppt_max = 100, 732 720 }, 733 721 }, 734 722 }, ··· 893 843 }, 894 844 { 895 845 .matches = { 896 - DMI_MATCH(DMI_BOARD_NAME, "GA403U"), 846 + DMI_MATCH(DMI_BOARD_NAME, "GA403UI"), 897 847 }, 898 848 .driver_data = &(struct power_data) { 899 849 .ac_data = &(struct power_limits) { ··· 925 875 }, 926 876 { 927 877 .matches = { 878 + DMI_MATCH(DMI_BOARD_NAME, "GA403UV"), 879 + }, 880 + .driver_data = &(struct power_data) { 881 + .ac_data = &(struct power_limits) { 882 + .ppt_pl1_spl_min = 15, 883 + .ppt_pl1_spl_max = 80, 884 + .ppt_pl2_sppt_min = 25, 885 + .ppt_pl2_sppt_max = 80, 886 + .ppt_pl3_fppt_min = 35, 887 + .ppt_pl3_fppt_max = 80, 888 + .nv_dynamic_boost_min = 5, 889 + .nv_dynamic_boost_max = 25, 890 + .nv_temp_target_min = 75, 891 + .nv_temp_target_max = 87, 892 + .nv_tgp_min = 55, 893 + .nv_tgp_max = 65, 894 + }, 895 + .dc_data = &(struct power_limits) { 896 + .ppt_pl1_spl_min = 15, 897 + .ppt_pl1_spl_max = 35, 898 + .ppt_pl2_sppt_min = 25, 899 + .ppt_pl2_sppt_max = 35, 900 + .ppt_pl3_fppt_min = 35, 901 + .ppt_pl3_fppt_max = 65, 902 + .nv_temp_target_min = 75, 903 + .nv_temp_target_max = 87, 904 + }, 905 + .requires_fan_curve = true, 906 + }, 907 + }, 908 + { 909 + .matches = { 910 + DMI_MATCH(DMI_BOARD_NAME, "GA403WM"), 911 + }, 912 + .driver_data = &(struct power_data) { 913 + .ac_data = &(struct power_limits) { 914 + .ppt_pl1_spl_min = 15, 915 + .ppt_pl1_spl_max = 80, 916 + .ppt_pl2_sppt_min = 25, 917 + .ppt_pl2_sppt_max = 80, 918 + .ppt_pl3_fppt_min = 35, 919 + .ppt_pl3_fppt_max = 80, 920 + .nv_dynamic_boost_min = 0, 921 + .nv_dynamic_boost_max = 15, 922 + .nv_temp_target_min = 75, 923 + .nv_temp_target_max = 87, 924 + .nv_tgp_min = 55, 925 + .nv_tgp_max = 85, 926 + }, 927 + .dc_data = &(struct power_limits) { 928 + .ppt_pl1_spl_min = 15, 929 + .ppt_pl1_spl_max = 35, 930 + .ppt_pl2_sppt_min = 25, 931 + .ppt_pl2_sppt_max = 35, 932 + .ppt_pl3_fppt_min = 35, 933 + .ppt_pl3_fppt_max = 65, 934 + .nv_temp_target_min = 75, 935 + .nv_temp_target_max = 87, 936 + }, 937 + .requires_fan_curve = true, 938 + }, 939 + }, 940 + { 941 + .matches = { 928 942 DMI_MATCH(DMI_BOARD_NAME, "GA403WR"), 943 + }, 944 + .driver_data = &(struct power_data) { 945 + .ac_data = &(struct power_limits) { 946 + .ppt_pl1_spl_min = 15, 947 + .ppt_pl1_spl_max = 80, 948 + .ppt_pl2_sppt_min = 25, 949 + .ppt_pl2_sppt_max = 80, 950 + .ppt_pl3_fppt_min = 35, 951 + .ppt_pl3_fppt_max = 80, 952 + .nv_dynamic_boost_min = 0, 953 + .nv_dynamic_boost_max = 25, 954 + .nv_temp_target_min = 75, 955 + .nv_temp_target_max = 87, 956 + .nv_tgp_min = 80, 957 + .nv_tgp_max = 95, 958 + }, 959 + .dc_data = &(struct power_limits) { 960 + .ppt_pl1_spl_min = 15, 961 + .ppt_pl1_spl_max = 35, 962 + .ppt_pl2_sppt_min = 25, 963 + .ppt_pl2_sppt_max = 35, 964 + .ppt_pl3_fppt_min = 35, 965 + .ppt_pl3_fppt_max = 65, 966 + .nv_temp_target_min = 75, 967 + .nv_temp_target_max = 87, 968 + }, 969 + .requires_fan_curve = true, 970 + }, 971 + }, 972 + { 973 + .matches = { 974 + DMI_MATCH(DMI_BOARD_NAME, "GA403WW"), 929 975 }, 930 976 .driver_data = &(struct power_data) { 931 977 .ac_data = &(struct power_limits) { ··· 1335 1189 }, 1336 1190 { 1337 1191 .matches = { 1192 + DMI_MATCH(DMI_BOARD_NAME, "GV302XV"), 1193 + }, 1194 + .driver_data = &(struct power_data) { 1195 + .ac_data = &(struct power_limits) { 1196 + .ppt_pl1_spl_min = 15, 1197 + .ppt_pl1_spl_max = 55, 1198 + .ppt_pl2_sppt_min = 25, 1199 + .ppt_pl2_sppt_max = 60, 1200 + .ppt_pl3_fppt_min = 35, 1201 + .ppt_pl3_fppt_max = 65, 1202 + .nv_temp_target_min = 75, 1203 + .nv_temp_target_max = 87, 1204 + }, 1205 + .dc_data = &(struct power_limits) { 1206 + .ppt_pl1_spl_min = 15, 1207 + .ppt_pl1_spl_max = 35, 1208 + .ppt_pl2_sppt_min = 25, 1209 + .ppt_pl2_sppt_max = 35, 1210 + .ppt_pl3_fppt_min = 35, 1211 + .ppt_pl3_fppt_max = 65, 1212 + .nv_temp_target_min = 75, 1213 + .nv_temp_target_max = 87, 1214 + }, 1215 + }, 1216 + }, 1217 + { 1218 + .matches = { 1338 1219 DMI_MATCH(DMI_BOARD_NAME, "GV601R"), 1339 1220 }, 1340 1221 .driver_data = &(struct power_data) { ··· 1484 1311 .ppt_pl1_spl_max = 100, 1485 1312 .ppt_pl2_sppt_min = 15, 1486 1313 .ppt_pl2_sppt_max = 190, 1314 + }, 1315 + .dc_data = NULL, 1316 + .requires_fan_curve = true, 1317 + }, 1318 + }, 1319 + { 1320 + .matches = { 1321 + DMI_MATCH(DMI_BOARD_NAME, "G513QY"), 1322 + }, 1323 + .driver_data = &(struct power_data) { 1324 + .ac_data = &(struct power_limits) { 1325 + /* Advantage Edition Laptop, no PL1 or PL2 limits */ 1326 + .ppt_apu_sppt_min = 15, 1327 + .ppt_apu_sppt_max = 100, 1328 + .ppt_platform_sppt_min = 70, 1329 + .ppt_platform_sppt_max = 190, 1487 1330 }, 1488 1331 .dc_data = NULL, 1489 1332 .requires_fan_curve = true, ··· 1744 1555 .nv_dynamic_boost_max = 25, 1745 1556 .nv_temp_target_min = 75, 1746 1557 .nv_temp_target_max = 87, 1558 + }, 1559 + .dc_data = &(struct power_limits) { 1560 + .ppt_pl1_spl_min = 25, 1561 + .ppt_pl1_spl_max = 55, 1562 + .ppt_pl2_sppt_min = 25, 1563 + .ppt_pl2_sppt_max = 70, 1564 + .nv_temp_target_min = 75, 1565 + .nv_temp_target_max = 87, 1566 + }, 1567 + .requires_fan_curve = true, 1568 + }, 1569 + }, 1570 + { 1571 + .matches = { 1572 + DMI_MATCH(DMI_BOARD_NAME, "G835LR"), 1573 + }, 1574 + .driver_data = &(struct power_data) { 1575 + .ac_data = &(struct power_limits) { 1576 + .ppt_pl1_spl_min = 28, 1577 + .ppt_pl1_spl_def = 140, 1578 + .ppt_pl1_spl_max = 175, 1579 + .ppt_pl2_sppt_min = 28, 1580 + .ppt_pl2_sppt_max = 175, 1581 + .nv_dynamic_boost_min = 5, 1582 + .nv_dynamic_boost_max = 25, 1583 + .nv_temp_target_min = 75, 1584 + .nv_temp_target_max = 87, 1585 + .nv_tgp_min = 65, 1586 + .nv_tgp_max = 115, 1747 1587 }, 1748 1588 .dc_data = &(struct power_limits) { 1749 1589 .ppt_pl1_spl_min = 25,
+2 -1
drivers/platform/x86/asus-wmi.c
··· 4889 4889 asus->egpu_enable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_EGPU); 4890 4890 asus->dgpu_disable_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_DGPU); 4891 4891 asus->kbd_rgb_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_STATE); 4892 - asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE); 4893 4892 4894 4893 if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MINI_LED_MODE)) 4895 4894 asus->mini_led_dev_id = ASUS_WMI_DEVID_MINI_LED_MODE; ··· 4900 4901 else if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_GPU_MUX_VIVO)) 4901 4902 asus->gpu_mux_dev = ASUS_WMI_DEVID_GPU_MUX_VIVO; 4902 4903 #endif /* IS_ENABLED(CONFIG_ASUS_WMI_DEPRECATED_ATTRS) */ 4904 + 4905 + asus->oobe_state_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_OOBE); 4903 4906 4904 4907 if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY)) 4905 4908 asus->throttle_thermal_policy_dev = ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY;
+8
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
··· 10 10 #include <linux/fs.h> 11 11 #include <linux/module.h> 12 12 #include <linux/kernel.h> 13 + #include <linux/printk.h> 14 + #include <linux/string.h> 13 15 #include <linux/wmi.h> 14 16 #include "bioscfg.h" 15 17 #include "../../firmware_attributes_class.h" ··· 782 780 783 781 if (ret < 0) 784 782 goto buff_attr_exit; 783 + 784 + if (strlen(str) == 0) { 785 + pr_debug("Ignoring attribute with empty name\n"); 786 + ret = 0; 787 + goto buff_attr_exit; 788 + } 785 789 786 790 if (attr_type == HPWMI_PASSWORD_TYPE || 787 791 attr_type == HPWMI_SECURE_PLATFORM_TYPE)
+7 -5
drivers/platform/x86/hp/hp-bioscfg/bioscfg.h
··· 10 10 11 11 #include <linux/wmi.h> 12 12 #include <linux/types.h> 13 + #include <linux/string.h> 13 14 #include <linux/device.h> 14 15 #include <linux/module.h> 15 16 #include <linux/kernel.h> ··· 57 56 58 57 #define PASSWD_MECHANISM_TYPES "password" 59 58 60 - #define HP_WMI_BIOS_GUID "5FB7F034-2C63-45e9-BE91-3D44E2C707E4" 59 + #define HP_WMI_BIOS_GUID "5FB7F034-2C63-45E9-BE91-3D44E2C707E4" 61 60 62 - #define HP_WMI_BIOS_STRING_GUID "988D08E3-68F4-4c35-AF3E-6A1B8106F83C" 61 + #define HP_WMI_BIOS_STRING_GUID "988D08E3-68F4-4C35-AF3E-6A1B8106F83C" 63 62 #define HP_WMI_BIOS_INTEGER_GUID "8232DE3D-663D-4327-A8F4-E293ADB9BF05" 64 63 #define HP_WMI_BIOS_ENUMERATION_GUID "2D114B49-2DFB-4130-B8FE-4A3C09E75133" 65 64 #define HP_WMI_BIOS_ORDERED_LIST_GUID "14EA9746-CE1F-4098-A0E0-7045CB4DA745" 66 65 #define HP_WMI_BIOS_PASSWORD_GUID "322F2028-0F84-4901-988E-015176049E2D" 67 - #define HP_WMI_SET_BIOS_SETTING_GUID "1F4C91EB-DC5C-460b-951D-C7CB9B4B8D5E" 66 + #define HP_WMI_SET_BIOS_SETTING_GUID "1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E" 68 67 69 68 enum hp_wmi_spm_commandtype { 70 69 HPWMI_SECUREPLATFORM_GET_STATE = 0x10, ··· 286 285 { \ 287 286 int i; \ 288 287 \ 289 - for (i = 0; i <= bioscfg_drv.type##_instances_count; i++) { \ 290 - if (!strcmp(kobj->name, bioscfg_drv.type##_data[i].attr_name_kobj->name)) \ 288 + for (i = 0; i < bioscfg_drv.type##_instances_count; i++) { \ 289 + if (bioscfg_drv.type##_data[i].attr_name_kobj && \ 290 + !strcmp(kobj->name, bioscfg_drv.type##_data[i].attr_name_kobj->name)) \ 291 291 return i; \ 292 292 } \ 293 293 return -EIO; \