platform/x86: uniwill-laptop: Remove cTGP control from unsupported devices
Subsystems (2)
PATCH 1/1 platform/x86: uniwill-laptop: Remove cTGP control from unsupported devices
Some devices like the InfinityBook Pro series have Dynamic Boost support, but the cTGP setting is actually ignored.
This commit adds the ability to still initialize DB, but hide the noop cTGP sysfs attribute and applies this to the respective devices.
--- drivers/platform/x86/uniwill/uniwill-acpi.c | 26 ++++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-)
drivers/platform/x86/uniwill/uniwill-acpi.c +17 -9
@@ -366,10 +366,12 @@#define UNIWILL_FEATURE_PRIMARY_FAN BIT(8)#define UNIWILL_FEATURE_SECONDARY_FAN BIT(9)#define UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL BIT(10) -#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(11) -#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(12) -#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(13) -#define UNIWILL_FEATURE_USB_POWERSHARE BIT(14) +/* Mutually exclusive with the cTGP control feature */ +#define UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY BIT(11) +#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(12) +#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(13) +#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(14) +#define UNIWILL_FEATURE_USB_POWERSHARE BIT(15)enum usb_c_power_priority_options {USB_C_POWER_PRIORITY_CHARGING =0 ,
@@ -1004,7 +1006,9 @@ static int uniwill_nvidia_ctgp_init(struct uniwill_data *data) {int ret; -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; ret =regmap_write (data->regmap,EC_ADDR_CTGP_DB_CTGP_OFFSET ,0 );
@@ -2577,7 +2581,9 @@ static int uniwill_suspend_usb_powershare(struct uniwill_data *data)static int uniwill_suspend_nvidia_ctgp (struct uniwill_data *data) { -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; return regmap_clear_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,
@@ -2686,7 +2692,9 @@ static int uniwill_resume_usb_powershare(struct uniwill_data *data)static int uniwill_resume_nvidia_ctgp (struct uniwill_data *data) { -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; return regmap_set_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,
@@ -2910,7 +2918,7 @@ static struct uniwill_device_descriptor phxtqxx_phxagxx_phxaqxx_phxpgxx_descriptUNIWILL_FEATURE_GPU_TEMP |UNIWILL_FEATURE_PRIMARY_FAN |UNIWILL_FEATURE_SECONDARY_FAN | -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY |UNIWILL_FEATURE_USB_C_POWER_PRIORITY | UNIWILL_FEATURE_KEYBOARD_BACKLIGHT, .kbd_led_single_color = true,
@@ -3106,7 +3114,7 @@ static int phxarxx_phxaqxx_probe(struct uniwill_data *data)if (value &HAS_GPU ) data->features |=UNIWILL_FEATURE_GPU_TEMP | -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL ; +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ;return 0 ; };
Signature · 1 line
2.43.0
Armin Wolf
maintainerAm 13.11.26 um 15:47 schrieb Werner Sembach:
Quoted 5 lines
Some devices like the InfinityBook Pro series have Dynamic Boost support, but the cTGP setting is actually ignored.
This commit adds the ability to still initialize DB, but hide the noop cTGP sysfs attribute and applies this to the respective devices.
IMHO the cTGP setting only works with the official NVidia driver and nvidia-powerd running in the background. Also there currently is a tiny issue with cTGP support, do you have a acpidump from one of the affected machines?
Thanks,
Armin Wolf
Quoted 77 lines
Signed-off-by Werner Sembach <[email protected]>--- drivers/platform/x86/uniwill/uniwill-acpi.c | 26 ++++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-)drivers/platform/x86/uniwill/uniwill-acpi.c +17
-9@@ -366,10 +366,12 @@#define UNIWILL_FEATURE_PRIMARY_FAN BIT(8)#define UNIWILL_FEATURE_SECONDARY_FAN BIT(9)#define UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL BIT(10) -#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(11) -#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(12) -#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(13) -#define UNIWILL_FEATURE_USB_POWERSHARE BIT(14) +/* Mutually exclusive with the cTGP control feature */ +#define UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY BIT(11) +#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(12) +#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(13) +#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(14) +#define UNIWILL_FEATURE_USB_POWERSHARE BIT(15)enum usb_c_power_priority_options {USB_C_POWER_PRIORITY_CHARGING =0 ,@@ -1004,7 +1006,9 @@ static int uniwill_nvidia_ctgp_init(struct uniwill_data *data) {int ret; -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; ret =regmap_write (data->regmap,EC_ADDR_CTGP_DB_CTGP_OFFSET ,0 );@@ -2577,7 +2581,9 @@ static int uniwill_suspend_usb_powershare(struct uniwill_data *data)static int uniwill_suspend_nvidia_ctgp (struct uniwill_data *data) { -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; return regmap_clear_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2686,7 +2692,9 @@ static int uniwill_resume_usb_powershare(struct uniwill_data *data)static int uniwill_resume_nvidia_ctgp (struct uniwill_data *data) { -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; return regmap_set_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2910,7 +2918,7 @@ static struct uniwill_device_descriptor phxtqxx_phxagxx_phxaqxx_phxpgxx_descriptUNIWILL_FEATURE_GPU_TEMP |UNIWILL_FEATURE_PRIMARY_FAN |UNIWILL_FEATURE_SECONDARY_FAN | -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY |UNIWILL_FEATURE_USB_C_POWER_PRIORITY | UNIWILL_FEATURE_KEYBOARD_BACKLIGHT, .kbd_led_single_color = true,@@ -3106,7 +3114,7 @@ static int phxarxx_phxaqxx_probe(struct uniwill_data *data)if (value &HAS_GPU ) data->features |=UNIWILL_FEATURE_GPU_TEMP | -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL ; +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ;return 0 ; };
Am 13.11.26 um 21:42 schrieb Armin Wolf:
Quoted 8 lines
Am 13.11.26 um 15:47 schrieb Werner Sembach:
Quoted 5 lines
Some devices like the InfinityBook Pro series have Dynamic Boost support, but the cTGP setting is actually ignored.
This commit adds the ability to still initialize DB, but hide the noop cTGP sysfs attribute and applies this to the respective devices.
IMHO the cTGP setting only works with the official NVidia driver and nvidia-powerd running in the background.
Yes I know, but so does DB and that one works, so the setup is correct.
Quoted 2 lines
Also there currently is a tiny
issue with cTGP support, do you have a acpidump from one of the affected machines?
Can generate one, I will send in a separate email because I will just sent the binary files, and want to make sure that this message doesn't get blocked by spam filters.
Quoted 78 lines
Thanks,
Armin WolfQuoted 73 lines
Signed-off-by Werner Sembach <[email protected]>---
drivers/platform/x86/uniwill/uniwill-acpi.c| 26 ++++++++++++++-------1 file changed, 17 insertions(+), 9 deletions(-)drivers/platform/x86/uniwill/uniwill-acpi.c +15
-6@@ -366,10 +366,12 @@ #define UNIWILL_FEATURE_PRIMARY_FAN BIT(8) #define UNIWILL_FEATURE_SECONDARY_FAN BIT(9) #define UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL BIT(10) -#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(11) -#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(12) -#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(13) -#define UNIWILL_FEATURE_USB_POWERSHARE BIT(14) +/* Mutually exclusive with the cTGP control feature */ +#define UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY BIT(11) +#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(12) +#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(13) +#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(14) +#define UNIWILL_FEATURE_USB_POWERSHARE BIT(15) enum usb_c_power_priority_options { USB_C_POWER_PRIORITY_CHARGING = 0,@@ -1004,7 +1006,9 @@ static int uniwill_nvidia_ctgp_init(struct uniwill_data *data) { int ret; - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; ret = regmap_write(data->regmap, EC_ADDR_CTGP_DB_CTGP_OFFSET, 0);@@ -2577,7 +2581,9 @@ static int uniwill_suspend_usb_powershare(struct uniwill_data *data) static int uniwill_suspend_nvidia_ctgp(struct uniwill_data *data) { - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; return regmap_clear_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2686,7 +2692,9 @@ static int uniwill_resume_usb_powershare(struct uniwill_data *data) static int uniwill_resume_nvidia_ctgp(struct uniwill_data *data) { - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; return regmap_set_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2910,7 +2918,7 @@ static struct uniwill_device_descriptor
phxtqxx_phxagxx_phxaqxx_phxpgxx_descriptUNIWILL_FEATURE_GPU_TEMP|UNIWILL_FEATURE_PRIMARY_FAN|UNIWILL_FEATURE_SECONDARY_FAN| -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL| +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY|UNIWILL_FEATURE_USB_C_POWER_PRIORITY|UNIWILL_FEATURE_KEYBOARD_BACKLIGHT, .kbd_led_single_color = true,drivers/platform/x86/uniwill/uniwill-acpi.c +0
-0@@ -3106,7 +3114,7 @@ static int phxarxx_phxaqxx_probe(struct uniwill_data *data) if (value & HAS_GPU)
data->features|=UNIWILL_FEATURE_GPU_TEMP| -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL; +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY; return 0;
};
Am 17.11.26 um 11:29 schrieb Werner Sembach:
Quoted 5 lines
Am 13.11.26 um 21:42 schrieb Armin Wolf:
Quoted 4 lines
Am 13.11.26 um 15:47 schrieb Werner Sembach:
Quoted 3 lines
Some devices like the InfinityBook Pro series have Dynamic Boost support, but the cTGP setting is actually ignored.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
This commit adds the ability to still initialize DB, but hide the noop cTGP sysfs attribute and applies this to the respective devices.
IMHO the cTGP setting only works with the official NVidia driver and nvidia-powerd running in the background.
Yes I know, but so does DB and that one works, so the setup is correct.
Quoted 2 lines
Also there currently is a tiny
issue with cTGP support, do you have a acpidump from one of the affected machines?Can generate one, I will send in a separate email because I will just sent the binary files, and want to make sure that this message doesn't get blocked by spam filters.
See attachment. It's from a InfinityBook 14 Gen7 with NVIDIA 3050Ti, aka PH4AQF1.
Quoted 78 lines
Quoted 78 lines
Thanks,
Armin WolfQuoted 73 lines
Signed-off-by Werner Sembach <[email protected]>---
drivers/platform/x86/uniwill/uniwill-acpi.c| 26 ++++++++++++++-------1 file changed, 17 insertions(+), 9 deletions(-)drivers/platform/x86/uniwill/uniwill-acpi.c +15
-6@@ -366,10 +366,12 @@ #define UNIWILL_FEATURE_PRIMARY_FAN BIT(8) #define UNIWILL_FEATURE_SECONDARY_FAN BIT(9) #define UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL BIT(10) -#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(11) -#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(12) -#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(13) -#define UNIWILL_FEATURE_USB_POWERSHARE BIT(14) +/* Mutually exclusive with the cTGP control feature */ +#define UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY BIT(11) +#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(12) +#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(13) +#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(14) +#define UNIWILL_FEATURE_USB_POWERSHARE BIT(15) enum usb_c_power_priority_options { USB_C_POWER_PRIORITY_CHARGING = 0,@@ -1004,7 +1006,9 @@ static int uniwill_nvidia_ctgp_init(struct uniwill_data *data) { int ret; - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; ret = regmap_write(data->regmap, EC_ADDR_CTGP_DB_CTGP_OFFSET, 0);@@ -2577,7 +2581,9 @@ static int uniwill_suspend_usb_powershare(struct uniwill_data *data) static int uniwill_suspend_nvidia_ctgp(struct uniwill_data *data) { - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; return regmap_clear_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2686,7 +2692,9 @@ static int uniwill_resume_usb_powershare(struct uniwill_data *data) static int uniwill_resume_nvidia_ctgp(struct uniwill_data *data) { - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; return regmap_set_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2910,7 +2918,7 @@ static struct uniwill_device_descriptor
phxtqxx_phxagxx_phxaqxx_phxpgxx_descriptUNIWILL_FEATURE_GPU_TEMP|UNIWILL_FEATURE_PRIMARY_FAN|UNIWILL_FEATURE_SECONDARY_FAN| -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL| +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY|UNIWILL_FEATURE_USB_C_POWER_PRIORITY|UNIWILL_FEATURE_KEYBOARD_BACKLIGHT, .kbd_led_single_color = true,drivers/platform/x86/uniwill/uniwill-acpi.c +0
-0@@ -3106,7 +3114,7 @@ static int phxarxx_phxaqxx_probe(struct uniwill_data *data) if (value & HAS_GPU)
data->features|=UNIWILL_FEATURE_GPU_TEMP| -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL; +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY; return 0;
};
Armin Wolf
maintainerAm 17.11.26 um 11:29 schrieb Werner Sembach:
Quoted 5 lines
Am 13.11.26 um 21:42 schrieb Armin Wolf:
Quoted 4 lines
Am 13.11.26 um 15:47 schrieb Werner Sembach:
Quoted 3 lines
Some devices like the InfinityBook Pro series have Dynamic Boost support, but the cTGP setting is actually ignored.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
This commit adds the ability to still initialize DB, but hide the noop cTGP sysfs attribute and applies this to the respective devices.
IMHO the cTGP setting only works with the official NVidia driver and nvidia-powerd running in the background.
Yes I know, but so does DB and that one works, so the setup is correct.
Quoted 2 lines
Also there currently is a tiny
issue with cTGP support, do you have a acpidump from one of the affected machines?Can generate one, I will send in a separate email because I will just sent the binary files, and want to make sure that this message doesn't get blocked by spam filters.
Thanks, got it.
As far as i can tell the cTGP suport is correctly wired up inside the ACPI firmware, so it _should_ work.
Maybe it has to do something with https://github.com/NVIDIA/open-gpu-kernel-modules/discussions/1447,
can you check if changing the cTGP limit triggers ACPI events? You should be able to observe such events using acpi_listen.
Thanks,
Armin Wolf
Quoted 82 lines
Quoted 81 lines
Thanks,
Armin WolfQuoted 76 lines
Signed-off-by Werner Sembach <[email protected]>---
drivers/platform/x86/uniwill/uniwill-acpi.c| 26
++++++++++++++-------1 file changed, 17 insertions(+), 9 deletions(-)drivers/platform/x86/uniwill/uniwill-acpi.c +15
-6@@ -366,10 +366,12 @@ #define UNIWILL_FEATURE_PRIMARY_FAN BIT(8) #define UNIWILL_FEATURE_SECONDARY_FAN BIT(9) #define UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL BIT(10) -#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(11) -#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(12) -#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(13) -#define UNIWILL_FEATURE_USB_POWERSHARE BIT(14) +/* Mutually exclusive with the cTGP control feature */ +#define UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY BIT(11) +#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(12) +#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(13) +#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(14) +#define UNIWILL_FEATURE_USB_POWERSHARE BIT(15) enum usb_c_power_priority_options { USB_C_POWER_PRIORITY_CHARGING = 0,@@ -1004,7 +1006,9 @@ static int uniwill_nvidia_ctgp_init(struct uniwill_data *data) { int ret; - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; ret = regmap_write(data->regmap, EC_ADDR_CTGP_DB_CTGP_OFFSET, 0);@@ -2577,7 +2581,9 @@ static int uniwill_suspend_usb_powershare(struct uniwill_data *data) static int uniwill_suspend_nvidia_ctgp(struct uniwill_data *data) { - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; return regmap_clear_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2686,7 +2692,9 @@ static int uniwill_resume_usb_powershare(struct uniwill_data *data) static int uniwill_resume_nvidia_ctgp(struct uniwill_data *data) { - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | + UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY)) return 0; return regmap_set_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2910,7 +2918,7 @@ static struct uniwill_device_descriptor
phxtqxx_phxagxx_phxaqxx_phxpgxx_descriptUNIWILL_FEATURE_GPU_TEMP|UNIWILL_FEATURE_PRIMARY_FAN|UNIWILL_FEATURE_SECONDARY_FAN| -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL| +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY|UNIWILL_FEATURE_USB_C_POWER_PRIORITY|UNIWILL_FEATURE_KEYBOARD_BACKLIGHT, .kbd_led_single_color = true,drivers/platform/x86/uniwill/uniwill-acpi.c +0
-0@@ -3106,7 +3114,7 @@ static int phxarxx_phxaqxx_probe(struct uniwill_data *data) if (value & HAS_GPU)
data->features|=UNIWILL_FEATURE_GPU_TEMP| -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL; +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY; return 0;
};
Am 20.11.26 um 22:04 schrieb Armin Wolf:
Quoted 16 lines
Am 17.11.26 um 11:29 schrieb Werner Sembach:
Quoted 5 lines
Am 13.11.26 um 21:42 schrieb Armin Wolf:
Quoted 4 lines
Am 13.11.26 um 15:47 schrieb Werner Sembach:
Quoted 3 lines
Some devices like the InfinityBook Pro series have Dynamic Boost support, but the cTGP setting is actually ignored.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
This commit adds the ability to still initialize DB, but hide the noop cTGP sysfs attribute and applies this to the respective devices.
IMHO the cTGP setting only works with the official NVidia driver and nvidia-powerd running in the background.
Yes I know, but so does DB and that one works, so the setup is correct.
Quoted 2 lines
Also there currently is a tiny
issue with cTGP support, do you have a acpidump from one of the affected machines?Can generate one, I will send in a separate email because I will just sent the binary files, and want to make sure that this message doesn't get blocked by spam filters.
Quoted 8 lines
Thanks, got it.
As far as i can tell the cTGP suport is correctly wired up inside the ACPI firmware, so it _should_ work.
Maybe it has to do something with https://github.com/NVIDIA/open-gpu-kernel-modules/discussions/1447,
can you check if changing the cTGP limit triggers ACPI events? You should be able to observe such events usingacpi_listen.
Double checked the windows side: the official windows cc for at least the ibp gen7 does not have the cTGP setting. So it really doesn't seem to be officially supported and tbh: I would leave it at that for the time being.
Quoted 83 lines
Thanks,
Armin WolfQuoted 79 lines
Quoted 78 lines
Thanks,
Armin WolfQuoted 73 lines
Signed-off-by Werner Sembach <[email protected]>---
drivers/platform/x86/uniwill/uniwill-acpi.c| 26 ++++++++++++++-------1 file changed, 17 insertions(+), 9 deletions(-)drivers/platform/x86/uniwill/uniwill-acpi.c +15
-6@@ -366,10 +366,12 @@ #define UNIWILL_FEATURE_PRIMARY_FAN BIT(8) #define UNIWILL_FEATURE_SECONDARY_FAN BIT(9) #define UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL BIT(10) -#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(11) -#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(12) -#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(13) -#define UNIWILL_FEATURE_USB_POWERSHARE BIT(14) +/* Mutually exclusive with the cTGP control feature */ +#define UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY BIT(11) +#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(12) +#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(13) +#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(14) +#define UNIWILL_FEATURE_USB_POWERSHARE BIT(15) enum usb_c_power_priority_options { USB_C_POWER_PRIORITY_CHARGING = 0,@@ -1004,7 +1006,9 @@ static int uniwill_nvidia_ctgp_init(struct uniwill_data *data) { int ret; - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY )) return 0; ret = regmap_write(data->regmap, EC_ADDR_CTGP_DB_CTGP_OFFSET, 0);@@ -2577,7 +2581,9 @@ static int uniwill_suspend_usb_powershare(struct uniwill_data *data) static int uniwill_suspend_nvidia_ctgp(struct uniwill_data *data) { - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY )) return 0; return regmap_clear_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2686,7 +2692,9 @@ static int uniwill_resume_usb_powershare(struct uniwill_data *data) static int uniwill_resume_nvidia_ctgp(struct uniwill_data *data) { - if (!uniwill_device_supports(data, UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL)) + if (!uniwill_device_supports_any(data, + UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY )) return 0; return regmap_set_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2910,7 +2918,7 @@ static struct uniwill_device_descriptor
phxtqxx_phxagxx_phxaqxx_phxpgxx_descriptUNIWILL_FEATURE_GPU_TEMP|UNIWILL_FEATURE_PRIMARY_FAN|UNIWILL_FEATURE_SECONDARY_FAN| -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL| +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY|UNIWILL_FEATURE_USB_C_POWER_PRIORITY|UNIWILL_FEATURE_KEYBOARD_BACKLIGHT, .kbd_led_single_color = true,drivers/platform/x86/uniwill/uniwill-acpi.c +0
-0@@ -3106,7 +3114,7 @@ static int phxarxx_phxaqxx_probe(struct uniwill_data *data) if (value & HAS_GPU)
data->features|=UNIWILL_FEATURE_GPU_TEMP| -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL; +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY; return 0;
};
Am 13.11.26 um 15:47 schrieb Werner Sembach:
Quoted 16 lines
Some devices like the InfinityBook Pro series have Dynamic Boost support, but the cTGP setting is actually ignored.
This commit adds the ability to still initialize DB, but hide the noop cTGP sysfs attribute and applies this to the respective devices.
Signed-off-by Werner Sembach <[email protected]>--- drivers/platform/x86/uniwill/uniwill-acpi.c | 26 ++++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-)drivers/platform/x86/uniwill/uniwill-acpi.c +0
-0
drivers/platform/x86/uniwill/uniwill-acpi.c line 370
Quoted 9 lines
drivers/platform/x86/uniwill/uniwill-acpi.c +2
-4@@ -366,10 +366,12 @@#define UNIWILL_FEATURE_PRIMARY_FAN BIT(8)#define UNIWILL_FEATURE_SECONDARY_FAN BIT(9)#define UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL BIT(10) -#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(11) -#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(12) -#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(13) -#define UNIWILL_FEATURE_USB_POWERSHARE BIT(14) +/* Mutually exclusive with the cTGP control feature */ +#define UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY BIT(11)
just realized something i forgot: this mutual exclusivity must be added to the force parameter. v2 incomming
Quoted 58 lines
drivers/platform/x86/uniwill/uniwill-acpi.c +15
-5+#define UNIWILL_FEATURE_USB_C_POWER_PRIORITY BIT(12) +#define UNIWILL_FEATURE_KEYBOARD_BACKLIGHT BIT(13) +#define UNIWILL_FEATURE_AC_AUTO_BOOT BIT(14) +#define UNIWILL_FEATURE_USB_POWERSHARE BIT(15)enum usb_c_power_priority_options {USB_C_POWER_PRIORITY_CHARGING =0 ,@@ -1004,7 +1006,9 @@ static int uniwill_nvidia_ctgp_init(struct uniwill_data *data) {int ret; -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; ret =regmap_write (data->regmap,EC_ADDR_CTGP_DB_CTGP_OFFSET ,0 );@@ -2577,7 +2581,9 @@ static int uniwill_suspend_usb_powershare(struct uniwill_data *data)static int uniwill_suspend_nvidia_ctgp (struct uniwill_data *data) { -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; return regmap_clear_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2686,7 +2692,9 @@ static int uniwill_resume_usb_powershare(struct uniwill_data *data)static int uniwill_resume_nvidia_ctgp (struct uniwill_data *data) { -if (!uniwill_device_supports (data,UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL )) +if (!uniwill_device_supports_any (data, +UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ))return 0 ; return regmap_set_bits(data->regmap, EC_ADDR_CTGP_DB_CTRL,@@ -2910,7 +2918,7 @@ static struct uniwill_device_descriptor phxtqxx_phxagxx_phxaqxx_phxpgxx_descriptUNIWILL_FEATURE_GPU_TEMP |UNIWILL_FEATURE_PRIMARY_FAN |UNIWILL_FEATURE_SECONDARY_FAN | -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL | +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY |UNIWILL_FEATURE_USB_C_POWER_PRIORITY | UNIWILL_FEATURE_KEYBOARD_BACKLIGHT, .kbd_led_single_color = true,@@ -3106,7 +3114,7 @@ static int phxarxx_phxaqxx_probe(struct uniwill_data *data)if (value &HAS_GPU ) data->features |=UNIWILL_FEATURE_GPU_TEMP | -UNIWILL_FEATURE_NVIDIA_CTGP_CONTROL ; +UNIWILL_FEATURE_NVIDIA_DB_SUPPORT_ONLY ;return 0 ; };