mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Werner Sembach <wse@tuxedocomputers.com>
To: "Armin Wolf" <W_Armin@gmx.de>, "Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86: uniwill-laptop: Remove cTGP control from unsupported devices
Date: Tue, 17 Nov 2026 11:31:40 +0100	[thread overview]
Message-ID: <2e0fe7c8-7f53-44e7-9305-3719ef0c7337@tuxedocomputers.com> (raw)
In-Reply-To: <da9b330c-a04e-4029-9abf-59fc4356da99@tuxedocomputers.com>

[-- Attachment #1: Type: text/plain, Size: 5209 bytes --]


Am 17.11.26 um 11:29 schrieb Werner Sembach:
> Am 13.11.26 um 21:42 schrieb Armin Wolf:
>> Am 13.11.26 um 15:47 schrieb Werner Sembach:
>>> 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.
>> 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.
>>
>> Thanks,
>> Armin Wolf
>>
>>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>>> ---
>>>   drivers/platform/x86/uniwill/uniwill-acpi.c | 26 ++++++++++++++-------
>>>   1 file changed, 17 insertions(+), 9 deletions(-)
>>>
>>> diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c 
>>> b/drivers/platform/x86/uniwill/uniwill-acpi.c
>>> index e2a6a704e942e..c0a75bc6e66db 100644
>>> --- a/drivers/platform/x86/uniwill/uniwill-acpi.c
>>> +++ b/drivers/platform/x86/uniwill/uniwill-acpi.c
>>> @@ -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_descript
>>>               UNIWILL_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;
>>>   };
>>

[-- Attachment #2: PH4AQF1_acpidump.tar.gz --]
[-- Type: application/gzip, Size: 122169 bytes --]

      reply	other threads:[~2026-11-17 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 14:47 Werner Sembach
2026-11-13 20:42 ` Armin Wolf
2026-11-17 10:29   ` Werner Sembach
2026-11-17 10:31     ` Werner Sembach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e0fe7c8-7f53-44e7-9305-3719ef0c7337@tuxedocomputers.com \
    --to=wse@tuxedocomputers.com \
    --cc=W_Armin@gmx.de \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®