From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Rong Zhang <i@rong.moe>
Cc: Punnay Sharma <punnaysharma805@gmail.com>,
Artem <temmi556@mail.ru>, Arnav Kapoor <kapoorarnav43@gmail.com>,
Mark Pearson <mpearson-lenovo@squebb.ca>,
Hans de Goede <hansg@kernel.org>, Ike Panhc <ikepanhc@gmail.com>,
"Derek J. Clark" <derekjohn.clark@gmail.com>,
Stuart Hayhurst <stuart.a.hayhurst@gmail.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight
Date: Thu, 3 Dec 2026 15:02:08 +0200 (EET) [thread overview]
Message-ID: <5c787d5d-ae91-a98d-e742-c0e51258e9dd@linux.intel.com> (raw)
In-Reply-To: <bf894bacb95bbae42d96892a34783302bab5cc9b.camel@rong.moe>
[-- 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.
next prev parent reply other threads:[~2026-12-03 13:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-12-03 13:23 ` Rong Zhang
2026-12-03 13:43 ` Rong Zhang
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=5c787d5d-ae91-a98d-e742-c0e51258e9dd@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=i@rong.moe \
--cc=ikepanhc@gmail.com \
--cc=kapoorarnav43@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@vger.kernel.org \
--cc=punnaysharma805@gmail.com \
--cc=stuart.a.hayhurst@gmail.com \
--cc=temmi556@mail.ru \
/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