From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.15 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796305726; b=Vca7nDNYa8g6l3lUbpKoSili01N/3tU2NBtYej2iaKOnKbvsHUaH7dvxOZbQYoDwt553 wZxY8/CX4th4ASP4oAj4uivmYX9QmZcXGiRVn4NR8pApXSyhm+Yci+sAoJ9pLsNClSRLR mIDd7hfHt/9vKnX1ymhsZmfLPGsDvxsOK0QB0mGjf2Wtn31iUruKd6NSako5zw1jKPczD o/uzGll1F5DWq4zJCAm9G7Gn/5JvRveBul48s+1f0BSpREu/pS/qWzKKvj+7q0ymmnTd9 RNvKZo605LfRrSC/00F0wsY0iOxKJXUPoI4EbHxfwkNbGfaM7c1EYK+oMp80BuTZzlg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796305726; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Subject:From:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date: MIME-Version:User-Agent:X-ZohoMailClient; bh=Qu/2rPRpIDjaM002FbLH6mHwlpQKG4Q+3QsOCKzEVWc=; b=PGSL4fMAEXlkS6S3er+W200wFMgRXFFYQLOpTz3nRPqfVBZwECHOcdb83TPDiLGZAcvC cRSxW37aVweDIsUdcANTfM7MxsPW5F6AkJOmGorpFy4lIr5in2W/yVXQ1wDRlceVPKYlJ UILNZmGJVoVlAaWZw5BJ/rOB24ncCLnzobuaKtiVYfUXTfYI5YJ9sOcTkXxpnizDGF5qX eReJnW8xJxtsyhoOHVaULaVW75J+YoBZSietcAeWcC1lPjglvNl5jGqz2xAdZVzNqnN49 euZ6VKlk2R9CZF1DclH6MVgYKM++QLyppwVV3IEfTr6Uo2GD7yuZvIGmPVcLdWJrRVQ== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=rong.moe; spf=pass smtp.mailfrom=rong.moe; dkim=pass header.d=rong.moe header.i=@rong.moe header.a=rsa-sha256 header.s=zmail2048 header.b=QzQNI1YE; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.15 Received: from sender5-op-o15.zoho.com (sender5-op-o15.zoho.com [165.173.182.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F4C9606A322; Thu, 3 Dec 2026 13:48:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7F4C9606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rong.moe Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rong.moe Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=rong.moe header.i=@rong.moe header.a=rsa-sha256 header.s=zmail2048 header.b=QzQNI1YE ARC-Seal: i=1; a=rsa-sha256; t=1796305712; cv=none; d=zohomail.com; s=zohoarc; b=PJEZD2x+H5vdnNrRgXskvKbkcUX7bv5pbwv2mguj1NfpmLTU4bU8zJhEStxmPw62Wx5oLRL4EJAB8jUhKvipxWsPXwXdJM3/wtUhsmXm8QDyAYham+A2y3YIfqJvJ3VBTMCttvTTAvFOCgHrJPwZ3pb2nsEmw1iJTHM8ge8Gk38= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796305712; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=Qu/2rPRpIDjaM002FbLH6mHwlpQKG4Q+3QsOCKzEVWc=; b=KagiaFH6QGu6zpf5Vp4qv19FheW0e6qjPEpCsqYDDj4P5I3euM9mx/+tDtkaMk/ZYTT6xbvZc2Nbv6kvKR/ji7i2AdAhLM5EDLD4JR0zUbiPxbarzXNz/2ti2WvYstikYIEtmup273uz/jk82eMuhNgsdou+uri/INrJQbw61l0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=rong.moe; spf=pass smtp.mailfrom=i@rong.moe; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=QzQNI1YEe1nQayVypCdkO9G/3bvCTVc5V12uWQNMx+hYKvzlj5lx9sS7SWga4AOppA6OMfPQFtmGPVDMP/EdlrHKXXhVixUWdoCYK2cpZRr8YkYnkY88kg+4XZ9rGETSVo7Bpr31LuHZojuRh6250QxIIHSpRudi6pbNVzOh+bgskvBcstQ0xrOE450UTHQQzNlNNR+HQUzpbm+vkEreH0MWC4KiziyQ4R0LBMc+tM+YuBMJzpsySYooimCRvi4n7WHIfsn6teAZuY7Ga04DD/iG+/g8jTBpFGVL0E5UCLrUj8iUV1mYwtX5Os1pUchqOcLYDKBr1aiwcQSNX2xx7w==; c=relaxed/relaxed; s=zmail2048; d=rong.moe; v=1; bh=Qu/2rPRpIDjaM002FbLH6mHwlpQKG4Q+3QsOCKzEVWc=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796305710349726.1324425672292; Thu, 3 Dec 2026 05:48:30 -0800 (PST) Message-ID: <963145252959e5a490e99b6f9229dd21abb31aa7.camel@rong.moe> Subject: Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight From: Rong Zhang To: Ilpo =?ISO-8859-1?Q?J=E4rvinen?= Cc: Punnay Sharma , Artem , Arnav Kapoor , Mark Pearson , Hans de Goede , Ike Panhc , "Derek J. Clark" , Stuart Hayhurst , platform-driver-x86@vger.kernel.org, LKML In-Reply-To: <00a57def60bd172cb2f3a90ade1b1a34bacb95c5.camel@rong.moe> References: <20261107140700.16036-1-punnaysharma805@gmail.com> <43b41d16-499f-b3bb-82f3-ea82f7ea99db@linux.intel.com> <5c787d5d-ae91-a98d-e742-c0e51258e9dd@linux.intel.com> <00a57def60bd172cb2f3a90ade1b1a34bacb95c5.camel@rong.moe> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 21:43:23 +0800 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Evolution 3.62.1-4 X-ZohoMailClient: External Hi All, On Thu, 2026-12-03 at 21:23 +0800, Rong Zhang wrote: > Hi Ilpo, >=20 > On Thu, 2026-12-03 at 15:02 +0200, Ilpo J=C3=A4rvinen wrote: > > On Thu, 3 Dec 2026, Rong Zhang wrote: > >=20 > > > Hi Punnay, Ilpo, > > >=20 > > > On Tue, 2026-12-01 at 19:30 +0530, Punnay Sharma wrote: > > > > On Tue, 1 Dec 2026 at 18:33, Ilpo J=C3=A4rvinen > > > > wrote: > > > >=20 > > > > > Hi all, > > > > >=20 > > > > > 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?= =C2=A0 > > > > >=20 > > >=20 > > > We don't know. While we believe it's safe to assume that (KBLC(whatev= er) > > > & BIT(0)) =3D=3D 0 implies a stubbed KBLC method, the opposite case s= eems > > > more complicated. > > >=20 > > > Basically BIT(0) is always 1 on devices implement the method (i.e., n= ot > > > stubbed), so by stripping it (>> 1) we got: > > >=20 > > > 0 - unknown (none?) > > > 1 - unknown (off, on?) > > > 2 - off, low, high > > > 3 - off, low, high, auto > > >=20 > > > While it's quite natural to make the assumptions in the parentheses, > > > firmware is usually unnatural. > >=20 > > We don't need that derivation for case 1 for deciding if BIT(0) counts = or=20 > > not? And we do have some evidence on what case 0 means. > >=20 > > I'm not asking guessing the remaining case 1 is but how to solve the bo= th=20 > > reported issues when it comes to the warning in what looks most logical= =20 > > way given the existing, known cases. >=20 > Hmm, I think I understand your words better now. >=20 > For this cycle, I will submit a patch to=C2=A0extract the really meaningf= ul > 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 >=20 > 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. >=20 > Thanks, > Rong >=20 > >=20 > > --=20 > > i. > >=20 > > > > > If not, > > > > > why are we using that bit while reporting an error about unknown = backlight > > > > > type? > > > > >=20 > > > > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarn= av43@gmail.com/ > > > >=20 > > > > Hi all, > > > >=20 > > > > So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, = KBLC sets > > > > BIT(0) first (RETD |=3D One) and only then checks the command, so e= very > > > > 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) an= d > > > > 0x1 -> 0, and the brightness read already drops BIT(0) with > > > > FIELD_GET(KBD_BL_GET_BRIGHTNESS, value), it's only the type check t= hat > > > > uses it > > > >=20 > > > > 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 > > > >=20 > > > > 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 > > > >=20 > > > > btw the ThinkBook question from bug 221198 is still open > > >=20 > > > 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 > > >=20 > > >=20 > > > 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 > > >=20 > > > Based on the information, even if we finally should treat > > > KBLC(KBD_BL_QUERY_TYPE) =3D=3D 1 as no KBLC control, a quirk table en= try > > > would still be required to work around ThinkBook 16 G6+ IMH. > > >=20 > > > So my suggestion is to take Arnav's patch (KBLC(KBD_BL_QUERY_TYPE) = =3D=3D 0) > > > this cycle and defer the KBLC(KBD_BL_QUERY_TYPE) =3D=3D 1 case until = the next > > > cycle to see if we can get more information. > > >=20 > > > Thanks, > > > Rong > > >=20 > > > >=20 > > > > Thanks, > > > > Punnay > > >=20