* [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight @ 2026-11-07 14:05 Punnay Sharma 2026-11-07 14:49 ` Rong Zhang 2026-12-01 13:03 ` Ilpo Järvinen 0 siblings, 2 replies; 9+ messages in thread From: Punnay Sharma @ 2026-11-07 14:05 UTC (permalink / raw) To: Hans de Goede, Ilpo Järvinen, Ike Panhc Cc: Punnay Sharma, Mark Pearson, Derek J. Clark, Rong Zhang, Stuart Hayhurst, platform-driver-x86, linux-kernel On probe, the driver asks KBLC for the keyboard backlight type and warns about any result other than 0x5 or 0x7. The LOQ 15IRX10 with an RGB keyboard returns 0x1. Its KBLC sets bit 0 in every result, and sets bit 2 for the type query only if the EC field GZ35 is 0. On this model GZ35 is not 0, and a separate USB controller (048d:c693) drives the keyboard lights. So 0x1 means that KBLC controls no keyboard backlight, but the driver logs on every boot: ideapad_acpi VPC2004:00: Unknown keyboard type: 1 Add KBD_BL_NONE_TYPE for 0x1 and do not warn about it. Tested on a Lenovo LOQ 15IRX10 (BIOS R3CN44WW). Signed-off-by: Punnay Sharma <punnaysharma805@gmail.com> --- KBD_BL_NONE_TYPE is placed last to avoid a conflict with Rong Zhang's pending keyboard backlight series. The same warning appears on other models, e.g. LOQ 15AHP10 [1] and Legion 5 Pro 16ACH6H [2]. [1] https://lore.kernel.org/all/3f03931e7eafcb1781ca3cf922e588ab57caadcf@lavx.hu/ [2] https://github.com/johnfanv2/LenovoLegionLinux/issues/336 drivers/platform/x86/lenovo/ideapad-laptop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c index fcb5ed7035f5..eb4158bed264 100644 --- a/drivers/platform/x86/lenovo/ideapad-laptop.c +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c @@ -148,6 +148,7 @@ enum { #define KBD_BL_QUERY_TYPE 0x1 #define KBD_BL_TRISTATE_TYPE 0x5 #define KBD_BL_TRISTATE_AUTO_TYPE 0x7 +#define KBD_BL_NONE_TYPE 0x1 /* No backlight through KBLC */ #define KBD_BL_COMMAND_GET 0x2 #define KBD_BL_COMMAND_SET 0x3 @@ -2246,7 +2247,7 @@ static int ideapad_check_features(struct ideapad_private *priv) } else if (val == KBD_BL_TRISTATE_AUTO_TYPE) { priv->features.kbd_bl = true; priv->kbd_bl.type = KBD_BL_TRISTATE_AUTO; - } else { + } else if (val != KBD_BL_NONE_TYPE) { dev_warn(&priv->platform_device->dev, "Unknown keyboard type: %lu", val); base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8 -- 2.56.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight 2026-11-07 14:05 [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight Punnay Sharma @ 2026-11-07 14:49 ` Rong Zhang 2026-11-10 1:29 ` Mark Pearson 2026-12-01 13:03 ` Ilpo Järvinen 1 sibling, 1 reply; 9+ messages in thread From: Rong Zhang @ 2026-11-07 14:49 UTC (permalink / raw) To: Punnay Sharma, Hans de Goede, Ilpo Järvinen, Ike Panhc Cc: Artem, Mark Pearson, Derek J. Clark, Stuart Hayhurst, platform-driver-x86, linux-kernel Hi Punnay, On Sat, 2026-11-07 at 19:35 +0530, Punnay Sharma wrote: > On probe, the driver asks KBLC for the keyboard backlight type and > warns about any result other than 0x5 or 0x7. > > The LOQ 15IRX10 with an RGB keyboard returns 0x1. Its KBLC sets bit 0 > in every result, and sets bit 2 for the type query only if the EC field > GZ35 is 0. On this model GZ35 is not 0, and a separate USB controller > (048d:c693) drives the keyboard lights. So 0x1 means that KBLC controls > no keyboard backlight, but the driver logs on every boot: > > ideapad_acpi VPC2004:00: Unknown keyboard type: 1 > > Add KBD_BL_NONE_TYPE for 0x1 and do not warn about it. > > Tested on a Lenovo LOQ 15IRX10 (BIOS R3CN44WW). +CC Artem. It seems that some devices provides functional KBLC despite KBD_BL_QUERY_TYPE returns 0x1. See https://bugzilla.kernel.org/show_bug.cgi?id=221198 Mark, Derek, could you check the documentation about keyboard backlight type? Thanks, Rong > > Signed-off-by: Punnay Sharma <punnaysharma805@gmail.com> > --- > KBD_BL_NONE_TYPE is placed last to avoid a conflict with Rong Zhang's > pending keyboard backlight series. > > The same warning appears on other models, e.g. LOQ 15AHP10 [1] and > Legion 5 Pro 16ACH6H [2]. > > [1] https://lore.kernel.org/all/3f03931e7eafcb1781ca3cf922e588ab57caadcf@lavx.hu/ > [2] https://github.com/johnfanv2/LenovoLegionLinux/issues/336 > > drivers/platform/x86/lenovo/ideapad-laptop.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c > index fcb5ed7035f5..eb4158bed264 100644 > --- a/drivers/platform/x86/lenovo/ideapad-laptop.c > +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c > @@ -148,6 +148,7 @@ enum { > #define KBD_BL_QUERY_TYPE 0x1 > #define KBD_BL_TRISTATE_TYPE 0x5 > #define KBD_BL_TRISTATE_AUTO_TYPE 0x7 > +#define KBD_BL_NONE_TYPE 0x1 /* No backlight through KBLC */ > > #define KBD_BL_COMMAND_GET 0x2 > #define KBD_BL_COMMAND_SET 0x3 > @@ -2246,7 +2247,7 @@ static int ideapad_check_features(struct ideapad_private *priv) > } else if (val == KBD_BL_TRISTATE_AUTO_TYPE) { > priv->features.kbd_bl = true; > priv->kbd_bl.type = KBD_BL_TRISTATE_AUTO; > - } else { > + } else if (val != KBD_BL_NONE_TYPE) { > dev_warn(&priv->platform_device->dev, > "Unknown keyboard type: %lu", > val); > > base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight 2026-11-07 14:49 ` Rong Zhang @ 2026-11-10 1:29 ` Mark Pearson 0 siblings, 0 replies; 9+ messages in thread From: Mark Pearson @ 2026-11-10 1:29 UTC (permalink / raw) To: Rong Zhang, Punnay Sharma, Hans de Goede, Ilpo Järvinen, Ike Panhc Cc: Artem, Derek J . Clark, Stuart Hayhurst, platform-driver-x86@vger.kernel.org, linux-kernel On Sat, Nov 7, 2026, at 9:49 AM, Rong Zhang wrote: > Hi Punnay, > > On Sat, 2026-11-07 at 19:35 +0530, Punnay Sharma wrote: >> On probe, the driver asks KBLC for the keyboard backlight type and >> warns about any result other than 0x5 or 0x7. >> >> The LOQ 15IRX10 with an RGB keyboard returns 0x1. Its KBLC sets bit 0 >> in every result, and sets bit 2 for the type query only if the EC field >> GZ35 is 0. On this model GZ35 is not 0, and a separate USB controller >> (048d:c693) drives the keyboard lights. So 0x1 means that KBLC controls >> no keyboard backlight, but the driver logs on every boot: >> >> ideapad_acpi VPC2004:00: Unknown keyboard type: 1 >> >> Add KBD_BL_NONE_TYPE for 0x1 and do not warn about it. >> >> Tested on a Lenovo LOQ 15IRX10 (BIOS R3CN44WW). > > +CC Artem. > > It seems that some devices provides functional KBLC despite > KBD_BL_QUERY_TYPE returns 0x1. See > https://bugzilla.kernel.org/show_bug.cgi?id=221198 > > Mark, Derek, could you check the documentation about keyboard backlight > type? > > Thanks, > Rong > >> >> Signed-off-by: Punnay Sharma <punnaysharma805@gmail.com> >> --- >> KBD_BL_NONE_TYPE is placed last to avoid a conflict with Rong Zhang's >> pending keyboard backlight series. >> >> The same warning appears on other models, e.g. LOQ 15AHP10 [1] and >> Legion 5 Pro 16ACH6H [2]. >> >> [1] https://lore.kernel.org/all/3f03931e7eafcb1781ca3cf922e588ab57caadcf@lavx.hu/ >> [2] https://github.com/johnfanv2/LenovoLegionLinux/issues/336 >> >> drivers/platform/x86/lenovo/ideapad-laptop.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c >> index fcb5ed7035f5..eb4158bed264 100644 >> --- a/drivers/platform/x86/lenovo/ideapad-laptop.c >> +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c >> @@ -148,6 +148,7 @@ enum { >> #define KBD_BL_QUERY_TYPE 0x1 >> #define KBD_BL_TRISTATE_TYPE 0x5 >> #define KBD_BL_TRISTATE_AUTO_TYPE 0x7 >> +#define KBD_BL_NONE_TYPE 0x1 /* No backlight through KBLC */ >> >> #define KBD_BL_COMMAND_GET 0x2 >> #define KBD_BL_COMMAND_SET 0x3 >> @@ -2246,7 +2247,7 @@ static int ideapad_check_features(struct ideapad_private *priv) >> } else if (val == KBD_BL_TRISTATE_AUTO_TYPE) { >> priv->features.kbd_bl = true; >> priv->kbd_bl.type = KBD_BL_TRISTATE_AUTO; >> - } else { >> + } else if (val != KBD_BL_NONE_TYPE) { >> dev_warn(&priv->platform_device->dev, >> "Unknown keyboard type: %lu", >> val); >> >> base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8 Afraid I don't have any documentation handy, but I reached out to the Thinkbook team (using the BZ ticket) as I have some contacts there and they might be able to help. Will see if I hear back. Mark ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight 2026-11-07 14:05 [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight Punnay Sharma 2026-11-07 14:49 ` Rong Zhang @ 2026-12-01 13:03 ` Ilpo Järvinen 2026-12-01 14:00 ` Punnay Sharma 1 sibling, 1 reply; 9+ messages in thread From: Ilpo Järvinen @ 2026-12-01 13:03 UTC (permalink / raw) To: Punnay Sharma, Arnav Kapoor, Rong Zhang, Mark Pearson Cc: Hans de Goede, Ike Panhc, Derek J. Clark, Stuart Hayhurst, platform-driver-x86, LKML On Sat, 7 Nov 2026, Punnay Sharma wrote: > On probe, the driver asks KBLC for the keyboard backlight type and > warns about any result other than 0x5 or 0x7. > > The LOQ 15IRX10 with an RGB keyboard returns 0x1. Its KBLC sets bit 0 > in every result, and sets bit 2 for the type query only if the EC field > GZ35 is 0. On this model GZ35 is not 0, and a separate USB controller > (048d:c693) drives the keyboard lights. So 0x1 means that KBLC controls > no keyboard backlight, but the driver logs on every boot: > > ideapad_acpi VPC2004:00: Unknown keyboard type: 1 > > Add KBD_BL_NONE_TYPE for 0x1 and do not warn about it. Hi all, Given what Punnay says above about BIT(0) and what Arnav's device reports [1], does the BIT(0) have anything to do with the backlight type? If not, why are we using that bit while reporting an error about unknown backlight type? [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43@gmail.com/ -- i. > Tested on a Lenovo LOQ 15IRX10 (BIOS R3CN44WW). > > Signed-off-by: Punnay Sharma <punnaysharma805@gmail.com> > --- > KBD_BL_NONE_TYPE is placed last to avoid a conflict with Rong Zhang's > pending keyboard backlight series. > > The same warning appears on other models, e.g. LOQ 15AHP10 [1] and > Legion 5 Pro 16ACH6H [2]. > > [1] https://lore.kernel.org/all/3f03931e7eafcb1781ca3cf922e588ab57caadcf@lavx.hu/ > [2] https://github.com/johnfanv2/LenovoLegionLinux/issues/336 > > drivers/platform/x86/lenovo/ideapad-laptop.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c > index fcb5ed7035f5..eb4158bed264 100644 > --- a/drivers/platform/x86/lenovo/ideapad-laptop.c > +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c > @@ -148,6 +148,7 @@ enum { > #define KBD_BL_QUERY_TYPE 0x1 > #define KBD_BL_TRISTATE_TYPE 0x5 > #define KBD_BL_TRISTATE_AUTO_TYPE 0x7 > +#define KBD_BL_NONE_TYPE 0x1 /* No backlight through KBLC */ > > #define KBD_BL_COMMAND_GET 0x2 > #define KBD_BL_COMMAND_SET 0x3 > @@ -2246,7 +2247,7 @@ static int ideapad_check_features(struct ideapad_private *priv) > } else if (val == KBD_BL_TRISTATE_AUTO_TYPE) { > priv->features.kbd_bl = true; > priv->kbd_bl.type = KBD_BL_TRISTATE_AUTO; > - } else { > + } else if (val != KBD_BL_NONE_TYPE) { > dev_warn(&priv->platform_device->dev, > "Unknown keyboard type: %lu", > val); > > base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8 > -- i. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight 2026-12-01 13:03 ` Ilpo Järvinen @ 2026-12-01 14:00 ` Punnay Sharma 2026-12-03 12:45 ` Rong Zhang 0 siblings, 1 reply; 9+ messages in thread From: Punnay Sharma @ 2026-12-01 14:00 UTC (permalink / raw) To: Ilpo Järvinen Cc: Arnav Kapoor, Rong Zhang, Mark Pearson, Hans de Goede, Ike Panhc, Derek J. Clark, Stuart Hayhurst, platform-driver-x86, LKML On Tue, 1 Dec 2026 at 18:33, Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> wrote: > Hi all, > > Given what Punnay says above about BIT(0) and what Arnav's device reports > [1], does the BIT(0) have anything to do with the backlight type? If not, > why are we using that bit while reporting an error about unknown backlight > type? > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43@gmail.com/ Hi all, So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, KBLC sets BIT(0) first (RETD |= One) and only then checks the command, so every result has BIT(0) set and the actual data sits in the bits above it, like 0x5 -> 2 (KBD_BL_TRISTATE), 0x7 -> 3 (KBD_BL_TRISTATE_AUTO) and 0x1 -> 0, and the brightness read already drops BIT(0) with FIELD_GET(KBD_BL_GET_BRIGHTNESS, value), it's only the type check that uses it Arnav's V14 G2 ITL is a bit different though, as his patch says its type query always returns Zero, so BIT(0) is just clear there so I thought of a v2 where the type check looks at BIT(0) and gets the type from the bits above this, but I need your guidance on it btw the ThinkBook question from bug 221198 is still open Thanks, Punnay ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight 2026-12-01 14:00 ` Punnay Sharma @ 2026-12-03 12:45 ` Rong Zhang 2026-12-03 13:02 ` Ilpo Järvinen 0 siblings, 1 reply; 9+ messages in thread From: Rong Zhang @ 2026-12-03 12:45 UTC (permalink / raw) To: Punnay Sharma, Ilpo Järvinen, Artem Cc: Arnav Kapoor, Mark Pearson, Hans de Goede, Ike Panhc, Derek J. Clark, Stuart Hayhurst, platform-driver-x86, LKML Hi Punnay, Ilpo, On Tue, 2026-12-01 at 19:30 +0530, Punnay Sharma wrote: > On Tue, 1 Dec 2026 at 18:33, Ilpo Järvinen > <ilpo.jarvinen@linux.intel.com> wrote: > > > Hi all, > > > > Given what Punnay says above about BIT(0) and what Arnav's device reports > > [1], does the BIT(0) have anything to do with the backlight type? > > We don't know. While we believe it's safe to assume that (KBLC(whatever) & BIT(0)) == 0 implies a stubbed KBLC method, the opposite case seems more complicated. Basically BIT(0) is always 1 on devices implement the method (i.e., not stubbed), so by stripping it (>> 1) we got: 0 - unknown (none?) 1 - unknown (off, on?) 2 - off, low, high 3 - off, low, high, auto While it's quite natural to make the assumptions in the parentheses, firmware is usually unnatural. > > If not, > > why are we using that bit while reporting an error about unknown backlight > > type? > > > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43@gmail.com/ > > Hi all, > > So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, KBLC sets > BIT(0) first (RETD |= One) and only then checks the command, so every > result has BIT(0) set and the actual data sits in the bits above it, > like 0x5 -> 2 (KBD_BL_TRISTATE), 0x7 -> 3 (KBD_BL_TRISTATE_AUTO) and > 0x1 -> 0, and the brightness read already drops BIT(0) with > FIELD_GET(KBD_BL_GET_BRIGHTNESS, value), it's only the type check that > uses it > > Arnav's V14 G2 ITL is a bit different though, as his patch says its > type query always returns Zero, so BIT(0) is just clear there > > so I thought of a v2 where the type check looks at BIT(0) and gets the > type from the bits above this, but I need your guidance on it > > btw the ThinkBook question from bug 221198 is still open Yeah, that's the exact reason why this is still pending. AFAIK the reported device (ThinkBook 16 G6+ IMH) comes with keyboard backlight, see https://www.notebookcheck-cn.com/Lenovo-ThinkBook-16-G6-IMH.859769.0.html According to the Chinese manual on Lenovo's website, this model also has an ambient light sensor, which is not even optional, see https://iknow.lenovo.com.cn/detail/419589 Based on the information, even if we finally should treat KBLC(KBD_BL_QUERY_TYPE) == 1 as no KBLC control, a quirk table entry would still be required to work around ThinkBook 16 G6+ IMH. So my suggestion is to take Arnav's patch (KBLC(KBD_BL_QUERY_TYPE) == 0) this cycle and defer the KBLC(KBD_BL_QUERY_TYPE) == 1 case until the next cycle to see if we can get more information. Thanks, Rong > > Thanks, > Punnay ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight 2026-12-03 12:45 ` Rong Zhang @ 2026-12-03 13:02 ` Ilpo Järvinen 2026-12-03 13:23 ` Rong Zhang 0 siblings, 1 reply; 9+ messages in thread From: Ilpo Järvinen @ 2026-12-03 13:02 UTC (permalink / raw) To: Rong Zhang Cc: Punnay Sharma, Artem, Arnav Kapoor, Mark Pearson, Hans de Goede, Ike Panhc, Derek J. Clark, Stuart Hayhurst, platform-driver-x86, LKML [-- Attachment #1: Type: text/plain, Size: 3212 bytes --] On Thu, 3 Dec 2026, Rong Zhang wrote: > Hi Punnay, Ilpo, > > On Tue, 2026-12-01 at 19:30 +0530, Punnay Sharma wrote: > > On Tue, 1 Dec 2026 at 18:33, Ilpo Järvinen > > <ilpo.jarvinen@linux.intel.com> wrote: > > > > > Hi all, > > > > > > Given what Punnay says above about BIT(0) and what Arnav's device reports > > > [1], does the BIT(0) have anything to do with the backlight type? > > > > > We don't know. While we believe it's safe to assume that (KBLC(whatever) > & BIT(0)) == 0 implies a stubbed KBLC method, the opposite case seems > more complicated. > > Basically BIT(0) is always 1 on devices implement the method (i.e., not > stubbed), so by stripping it (>> 1) we got: > > 0 - unknown (none?) > 1 - unknown (off, on?) > 2 - off, low, high > 3 - off, low, high, auto > > While it's quite natural to make the assumptions in the parentheses, > firmware is usually unnatural. We don't need that derivation for case 1 for deciding if BIT(0) counts or not? And we do have some evidence on what case 0 means. I'm not asking guessing the remaining case 1 is but how to solve the both reported issues when it comes to the warning in what looks most logical way given the existing, known cases. -- i. > > > If not, > > > why are we using that bit while reporting an error about unknown backlight > > > type? > > > > > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43@gmail.com/ > > > > Hi all, > > > > So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, KBLC sets > > BIT(0) first (RETD |= One) and only then checks the command, so every > > result has BIT(0) set and the actual data sits in the bits above it, > > like 0x5 -> 2 (KBD_BL_TRISTATE), 0x7 -> 3 (KBD_BL_TRISTATE_AUTO) and > > 0x1 -> 0, and the brightness read already drops BIT(0) with > > FIELD_GET(KBD_BL_GET_BRIGHTNESS, value), it's only the type check that > > uses it > > > > Arnav's V14 G2 ITL is a bit different though, as his patch says its > > type query always returns Zero, so BIT(0) is just clear there > > > > so I thought of a v2 where the type check looks at BIT(0) and gets the > > type from the bits above this, but I need your guidance on it > > > > btw the ThinkBook question from bug 221198 is still open > > Yeah, that's the exact reason why this is still pending. AFAIK the > reported device (ThinkBook 16 G6+ IMH) comes with keyboard backlight, see > https://www.notebookcheck-cn.com/Lenovo-ThinkBook-16-G6-IMH.859769.0.html > > > According to the Chinese manual on Lenovo's website, this model also has > an ambient light sensor, which is not even optional, see > https://iknow.lenovo.com.cn/detail/419589 > > Based on the information, even if we finally should treat > KBLC(KBD_BL_QUERY_TYPE) == 1 as no KBLC control, a quirk table entry > would still be required to work around ThinkBook 16 G6+ IMH. > > So my suggestion is to take Arnav's patch (KBLC(KBD_BL_QUERY_TYPE) == 0) > this cycle and defer the KBLC(KBD_BL_QUERY_TYPE) == 1 case until the next > cycle to see if we can get more information. > > Thanks, > Rong > > > > > Thanks, > > Punnay > -- i. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight 2026-12-03 13:02 ` Ilpo Järvinen @ 2026-12-03 13:23 ` Rong Zhang 2026-12-03 13:43 ` Rong Zhang 0 siblings, 1 reply; 9+ messages in thread From: Rong Zhang @ 2026-12-03 13:23 UTC (permalink / raw) To: Ilpo Järvinen Cc: Punnay Sharma, Artem, Arnav Kapoor, Mark Pearson, Hans de Goede, Ike Panhc, Derek J. Clark, Stuart Hayhurst, platform-driver-x86, LKML Hi Ilpo, On Thu, 2026-12-03 at 15:02 +0200, Ilpo Järvinen wrote: > On Thu, 3 Dec 2026, Rong Zhang wrote: > > > Hi Punnay, Ilpo, > > > > On Tue, 2026-12-01 at 19:30 +0530, Punnay Sharma wrote: > > > On Tue, 1 Dec 2026 at 18:33, Ilpo Järvinen > > > <ilpo.jarvinen@linux.intel.com> wrote: > > > > > > > Hi all, > > > > > > > > Given what Punnay says above about BIT(0) and what Arnav's device reports > > > > [1], does the BIT(0) have anything to do with the backlight type? > > > > > > > > We don't know. While we believe it's safe to assume that (KBLC(whatever) > > & BIT(0)) == 0 implies a stubbed KBLC method, the opposite case seems > > more complicated. > > > > Basically BIT(0) is always 1 on devices implement the method (i.e., not > > stubbed), so by stripping it (>> 1) we got: > > > > 0 - unknown (none?) > > 1 - unknown (off, on?) > > 2 - off, low, high > > 3 - off, low, high, auto > > > > While it's quite natural to make the assumptions in the parentheses, > > firmware is usually unnatural. > > We don't need that derivation for case 1 for deciding if BIT(0) counts or > not? And we do have some evidence on what case 0 means. > > I'm not asking guessing the remaining case 1 is but how to solve the both > reported issues when it comes to the warning in what looks most logical > way given the existing, known cases. Hmm, I think I understand your words better now. For this cycle, I will submit a patch to extract the really meaningful type value, drop KBD_BL_TRISTATE_TYPE and KBD_BL_TRISTATE_AUTO_TYPE in favor of KBD_BL_TRISTATE and KBD_BL_TRISTATE_AUTO, and refine the warning message. This should also supersede Arnav's patch. Punnay, if you are not in a hurry to fix the false positive warning on your device, let's wait until the next cycle to see if we can get some more information. By then if we don't get any useful information, you can mute the warning for the 0 case above with a quirk table entry for ThinkBook 16 G6+ IMH. Thanks, Rong > > -- > i. > > > > > If not, > > > > why are we using that bit while reporting an error about unknown backlight > > > > type? > > > > > > > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43@gmail.com/ > > > > > > Hi all, > > > > > > So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, KBLC sets > > > BIT(0) first (RETD |= One) and only then checks the command, so every > > > result has BIT(0) set and the actual data sits in the bits above it, > > > like 0x5 -> 2 (KBD_BL_TRISTATE), 0x7 -> 3 (KBD_BL_TRISTATE_AUTO) and > > > 0x1 -> 0, and the brightness read already drops BIT(0) with > > > FIELD_GET(KBD_BL_GET_BRIGHTNESS, value), it's only the type check that > > > uses it > > > > > > Arnav's V14 G2 ITL is a bit different though, as his patch says its > > > type query always returns Zero, so BIT(0) is just clear there > > > > > > so I thought of a v2 where the type check looks at BIT(0) and gets the > > > type from the bits above this, but I need your guidance on it > > > > > > btw the ThinkBook question from bug 221198 is still open > > > > Yeah, that's the exact reason why this is still pending. AFAIK the > > reported device (ThinkBook 16 G6+ IMH) comes with keyboard backlight, see > > https://www.notebookcheck-cn.com/Lenovo-ThinkBook-16-G6-IMH.859769.0.html > > > > > > According to the Chinese manual on Lenovo's website, this model also has > > an ambient light sensor, which is not even optional, see > > https://iknow.lenovo.com.cn/detail/419589 > > > > Based on the information, even if we finally should treat > > KBLC(KBD_BL_QUERY_TYPE) == 1 as no KBLC control, a quirk table entry > > would still be required to work around ThinkBook 16 G6+ IMH. > > > > So my suggestion is to take Arnav's patch (KBLC(KBD_BL_QUERY_TYPE) == 0) > > this cycle and defer the KBLC(KBD_BL_QUERY_TYPE) == 1 case until the next > > cycle to see if we can get more information. > > > > Thanks, > > Rong > > > > > > > > Thanks, > > > Punnay > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight 2026-12-03 13:23 ` Rong Zhang @ 2026-12-03 13:43 ` Rong Zhang 0 siblings, 0 replies; 9+ messages in thread From: Rong Zhang @ 2026-12-03 13:43 UTC (permalink / raw) To: Ilpo Järvinen Cc: Punnay Sharma, Artem, Arnav Kapoor, Mark Pearson, Hans de Goede, Ike Panhc, Derek J. Clark, Stuart Hayhurst, platform-driver-x86, LKML Hi All, On Thu, 2026-12-03 at 21:23 +0800, Rong Zhang wrote: > Hi Ilpo, > > On Thu, 2026-12-03 at 15:02 +0200, Ilpo Järvinen wrote: > > On Thu, 3 Dec 2026, Rong Zhang wrote: > > > > > Hi Punnay, Ilpo, > > > > > > On Tue, 2026-12-01 at 19:30 +0530, Punnay Sharma wrote: > > > > On Tue, 1 Dec 2026 at 18:33, Ilpo Järvinen > > > > <ilpo.jarvinen@linux.intel.com> wrote: > > > > > > > > > Hi all, > > > > > > > > > > Given what Punnay says above about BIT(0) and what Arnav's device reports > > > > > [1], does the BIT(0) have anything to do with the backlight type? > > > > > > > > > > > We don't know. While we believe it's safe to assume that (KBLC(whatever) > > > & BIT(0)) == 0 implies a stubbed KBLC method, the opposite case seems > > > more complicated. > > > > > > Basically BIT(0) is always 1 on devices implement the method (i.e., not > > > stubbed), so by stripping it (>> 1) we got: > > > > > > 0 - unknown (none?) > > > 1 - unknown (off, on?) > > > 2 - off, low, high > > > 3 - off, low, high, auto > > > > > > While it's quite natural to make the assumptions in the parentheses, > > > firmware is usually unnatural. > > > > We don't need that derivation for case 1 for deciding if BIT(0) counts or > > not? And we do have some evidence on what case 0 means. > > > > I'm not asking guessing the remaining case 1 is but how to solve the both > > reported issues when it comes to the warning in what looks most logical > > way given the existing, known cases. > > Hmm, I think I understand your words better now. > > For this cycle, I will submit a patch to extract the really meaningful > type value, drop KBD_BL_TRISTATE_TYPE and KBD_BL_TRISTATE_AUTO_TYPE in > favor of KBD_BL_TRISTATE and KBD_BL_TRISTATE_AUTO, and refine the warning > message. This should also supersede Arnav's patch. I just check a random DSDT dump collected online, and it seems that BIT(0) actually means "successful". I will refine the exec_kblc() helper function to take the advantage of it, too. Thanks, Rong > > Punnay, if you are not in a hurry to fix the false positive warning on > your device, let's wait until the next cycle to see if we can get some > more information. By then if we don't get any useful information, you can > mute the warning for the 0 case above with a quirk table entry for > ThinkBook 16 G6+ IMH. > > Thanks, > Rong > > > > > -- > > i. > > > > > > > If not, > > > > > why are we using that bit while reporting an error about unknown backlight > > > > > type? > > > > > > > > > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43@gmail.com/ > > > > > > > > Hi all, > > > > > > > > So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, KBLC sets > > > > BIT(0) first (RETD |= One) and only then checks the command, so every > > > > result has BIT(0) set and the actual data sits in the bits above it, > > > > like 0x5 -> 2 (KBD_BL_TRISTATE), 0x7 -> 3 (KBD_BL_TRISTATE_AUTO) and > > > > 0x1 -> 0, and the brightness read already drops BIT(0) with > > > > FIELD_GET(KBD_BL_GET_BRIGHTNESS, value), it's only the type check that > > > > uses it > > > > > > > > Arnav's V14 G2 ITL is a bit different though, as his patch says its > > > > type query always returns Zero, so BIT(0) is just clear there > > > > > > > > so I thought of a v2 where the type check looks at BIT(0) and gets the > > > > type from the bits above this, but I need your guidance on it > > > > > > > > btw the ThinkBook question from bug 221198 is still open > > > > > > Yeah, that's the exact reason why this is still pending. AFAIK the > > > reported device (ThinkBook 16 G6+ IMH) comes with keyboard backlight, see > > > https://www.notebookcheck-cn.com/Lenovo-ThinkBook-16-G6-IMH.859769.0.html > > > > > > > > > According to the Chinese manual on Lenovo's website, this model also has > > > an ambient light sensor, which is not even optional, see > > > https://iknow.lenovo.com.cn/detail/419589 > > > > > > Based on the information, even if we finally should treat > > > KBLC(KBD_BL_QUERY_TYPE) == 1 as no KBLC control, a quirk table entry > > > would still be required to work around ThinkBook 16 G6+ IMH. > > > > > > So my suggestion is to take Arnav's patch (KBLC(KBD_BL_QUERY_TYPE) == 0) > > > this cycle and defer the KBLC(KBD_BL_QUERY_TYPE) == 1 case until the next > > > cycle to see if we can get more information. > > > > > > Thanks, > > > Rong > > > > > > > > > > > Thanks, > > > > Punnay > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-12-03 13:48 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-07 14:05 [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight Punnay Sharma 2026-11-07 14:49 ` Rong Zhang 2026-11-10 1:29 ` Mark Pearson 2026-12-01 13:03 ` Ilpo Järvinen 2026-12-01 14:00 ` Punnay Sharma 2026-12-03 12:45 ` Rong Zhang 2026-12-03 13:02 ` Ilpo Järvinen 2026-12-03 13:23 ` Rong Zhang 2026-12-03 13:43 ` Rong Zhang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox