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=1796304542; b=br1gJRstx/cwL7PsiZiEb9YQedSAiYWL2QzXmjUMjock3B+NImii3MFJ09oO5i2HfV3i Wcw6YYAo/LqEtreLDcMMgCgFU6sHmdkQxQf20XqVQ5cSClGNbVuuwY40aPi+2LbSvFcWN NREzyerTL6HOeHOL9PefslySlbX63yDTIsImlcjawnIKqheQT0qSu5W1X7MVYvEVfIh4G J4saqAnKfhBZ4BfWJ04KrHYKhQ+5wYTwv288Bz2t+I0s6YUm6AL4c8RlRx/CxblTefroh ZwRtUE7G5w7i44+McxMvE624nlzOdU/0bgbiNS1Qi059DFGIu6jIgcG9bqV4t5gBh2A== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796304542; 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=vF2gOb11k8ERub3p3abIn6ieLWZs33kXcZC6EBLa6a8=; b=kMRz9GIAzMCWEUZKDm/HtJZZ3nAntNPbhlm0SlbklFF+PbQjK36EArDa+A9HGUWhSq+N jUqSvJm6fwuRoHyFnHETbIqTm4jwNRPL19GX/rDLV/cHK9ns0pixJ8IPg9/9lfa/biRpk yUmpCBWAdJMqKf6HE+klHeAtKfyqZtlYeb8N20CFy5GWMIMBf1l7t2/OYKiwPBL//8X21 FSPrZfe2B8cCY1I25hXdjF09THg4x5fC1G+YZTnMmFLek4mkegAflnsZDsNQb+XpDxrgR h8dXFGBisPvHQHJtXv3W/3zI+i0slJ6YK9BxINgLSCQGo+ci1VVDUJrPK4qfkpzRzqA== 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=cJGwahjl; 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)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73645606A32F; Thu, 3 Dec 2026 13:29:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 73645606A32F 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=cJGwahjl ARC-Seal: i=1; a=rsa-sha256; t=1796304521; cv=none; d=zohomail.com; s=zohoarc; b=ahv1c9Lq22vU+mnyWtKaiID03jSTxHRjMgOJEzZcdZ8xYLr1+1PZJmWCQB8H1i7m2r8wfLc+e4mpo6ff78QJrGG44hhKc4WSDiUc1za0WKJ1w2h8w1jPwR6vcD+HUbOgT2IerGEXFUKx3VdPtJvP9d1CPUbgwZwWkZgTJAYr+Yg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796304521; 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=vF2gOb11k8ERub3p3abIn6ieLWZs33kXcZC6EBLa6a8=; b=a8zKGrLp5wmEr21UdtwLrVv/9TCv/tt59/4EiXE9T/xobDpv4TieEVz9U6QBgzyKQqOJt7lb1umnMfATLxVsrzbdXefnWt+OoRzYIbcKLieHAgZfre52SIowbWto0CUetnyLPodseN0+GiLM3WDamedtIH0aNaJWeV349CaQLW4= 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=cJGwahjlnuG0MNb1OmAewGqCPOXXvYUArXGJnd7u4zJbVqGvzsWPp11duou8wbIeQCUZ9WD525SZuYIbNC8/8Ui0Og0e3mNg7A0OTM0lpOVYziypLIhdT9c51J7u6Kp6VfzOtAEU6mXYkUvEz7MIuvCIYmKS3HzsMY1hA4xm5aJvnTfVauIvvYSECTI8p6FVNpYlD2LWKm9FntVIB7mXzDDQt7RfixsBHvQPGBMdIJ1CkWrQ9U0wavMBROUPIYOMVyRTs4PPtbHzaGgH5CNXycic+EIlCQxcciV/C3a71I91xhm6hQ5MAFqqyv7reXh6wPntMIr5BmO69OZDLLLnMQ==; c=relaxed/relaxed; s=zmail2048; d=rong.moe; v=1; bh=vF2gOb11k8ERub3p3abIn6ieLWZs33kXcZC6EBLa6a8=; 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 1796304517613512.4725658228234; Thu, 3 Dec 2026 05:28:37 -0800 (PST) Message-ID: <00a57def60bd172cb2f3a90ade1b1a34bacb95c5.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: <5c787d5d-ae91-a98d-e742-c0e51258e9dd@linux.intel.com> References: <20261107140700.16036-1-punnaysharma805@gmail.com> <43b41d16-499f-b3bb-82f3-ea82f7ea99db@linux.intel.com> <5c787d5d-ae91-a98d-e742-c0e51258e9dd@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 21:23:29 +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 Ilpo, 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 r= eports > > > > [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(whatever= ) > > & BIT(0)) =3D=3D 0 implies a stubbed KBLC method, the opposite case see= ms > > more complicated. > >=20 > > Basically BIT(0) is always 1 on devices implement the method (i.e., not > > 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 both= =20 > reported issues when it comes to the warning in what looks most logical= =20 > way given the existing, known cases. Hmm, I think I understand your words better now. For this cycle, I will submit a patch to=C2=A0extract 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 >=20 > --=20 > i. >=20 > > > > If not, > > > > why are we using that bit while reporting an error about unknown ba= cklight > > > > type? > > > >=20 > > > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav= 43@gmail.com/ > > >=20 > > > Hi all, > > >=20 > > > So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, KB= LC sets > > > BIT(0) first (RETD |=3D One) and only then checks the command, so eve= ry > > > 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 tha= t > > > 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 th= e > > > 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, s= ee > > https://www.notebookcheck-cn.com/Lenovo-ThinkBook-16-G6-IMH.859769.0.ht= ml > >=20 > >=20 > > According to the Chinese manual on Lenovo's website, this model also ha= s > > 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 entr= y > > 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 th= e next > > cycle to see if we can get more information. > >=20 > > Thanks, > > Rong > >=20 > > >=20 > > > Thanks, > > > Punnay > >=20