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=1796302258; b=l2KUGbKfeTgMXtAmZnWx606f1jwCh9/8MpYJMbALtPwz5qO8j8aFlQBD2shJtO0s91p4 B4Wg3PoynhNeErjWdek4xW6JiAHoZw2gqibjVz/9uyy7ItrJBFVWnYUGpKvNRrxxPTJPF JEnJMGUmBFmhRytOT4NhKkzGdQBCHkaEVgs7puEM8yaOctEI6XvnSpxemk4/QzdkdQp3M 9vrc58NMaF3E/DslP3deRC1zVWx8GdkESiELKs2NNlKfjoakeJCMgNzFGzSP1pDvwbLIb FDSplXx4hOifZ20WvncbSrZbwmv8KhPwzHavZ88lU1n3TkrlpMjbsosk41qfwxI80OQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796302258; 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=rDTwPQZKCf47wiDOc7MTqVughnJcZ5rklhzS1i/xDX8=; b=Kp3k1XJXmvqc3CP7jAtd9o8mYFhLm2SaRd4Dk11p5djqzsdbLuHNogCW2BGCZGWr2pKy BzlJwr9kAr7/ujU1xoCJLk3clsAjPomirhk1slCVqFOlAMfYKfiLjTBnyAe8HPn/tIvdv z+knMmdoOh95geboaDeZuwwT8tdxQI07fd9V4qVQTbAQYoF7C8hsQEnAsKHeDxC2ibq5g yOgH+YU24tavMM0VcT33Z2WFaXaxWvobQxDq3o5jrpt9UkpcaDQ/fvnIPToUwO/KyWxXR VyikybFWX+YVD6yL1FieJBqgkfNkrMtHcziFLn/VzkZ7NuvHj4BRGQUXnTPesr1PYQQ== 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=B7temkme; 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 9BA7D606A32D; Thu, 3 Dec 2026 12:50:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9BA7D606A32D 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=B7temkme ARC-Seal: i=1; a=rsa-sha256; t=1796302244; cv=none; d=zohomail.com; s=zohoarc; b=GrYSrB99UDQVOdgP64g6AR3/rXI72dURGOo9drjVY867OfWTn+Mj2evMphXnsojNw0AR0+R4sAG2W3XPGkVG8AmYhEg5Bw8waJ4Df+XCGg9KDzhnMmaMWdez6NsLNhSrPNZhua5uA2r+FMK/Tt4ge74SE8Qx82cg4JhES/0/JJI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796302244; 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=rDTwPQZKCf47wiDOc7MTqVughnJcZ5rklhzS1i/xDX8=; b=Q1MNC20LlqoY8bJr/69HKd+13i+sJxFKEvZd9PrhmyTi71+O7ji+6ah29qRvGVM8gOa6lOmlspLc+sTrMPYylQIc+D4WBVSjnFDx87xsf63GEJ7sfuqVarsvqWG46tROqOScYjvZY3klOqDazh396WMD6jGKCnv/S6dZJy07Ww0= 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=B7temkmeMiq74iOrhDxYk5OrIK8OertAncKceTWF6fIWGjxL53cher9dyhSgFbcEboRIT6JyxrEree7cH2QuBF6qg3blaAZf7okdrlE8DAgGFLMzgx2N7hutzskW6iYrzajlojECr+weI4yuh9OCwzhuwsLEgK2zLoqQ5FxjyTKLZ6I8VNpcfCuex4F0BW/IDwnC0g8rdFl17msy19SWUB6PAa0YfRzYnYIoSaiGzvH1VsYRVosUCGNXfuCq9sPkKefjBXLL2ntJOSzNIvFTw50ehzSvE7gjcRWCcxQddAU33JKaLkh8OO0eF+ZIutvg7CyGmxbP5RvIxP8yne6NBw==; c=relaxed/relaxed; s=zmail2048; d=rong.moe; v=1; bh=rDTwPQZKCf47wiDOc7MTqVughnJcZ5rklhzS1i/xDX8=; 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 1796302241839233.05845853113397; Thu, 3 Dec 2026 04:50:41 -0800 (PST) Message-ID: Subject: Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight From: Rong Zhang To: Punnay Sharma , Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , Artem Cc: Arnav Kapoor , Mark Pearson , Hans de Goede , Ike Panhc , "Derek J. Clark" , Stuart Hayhurst , platform-driver-x86@vger.kernel.org, LKML In-Reply-To: References: <20261107140700.16036-1-punnaysharma805@gmail.com> <43b41d16-499f-b3bb-82f3-ea82f7ea99db@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 20:45:34 +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 Punnay, Ilpo, 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 repor= ts > > [1], does the BIT(0) have anything to do with the backlight type?=C2=A0 > >=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 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 backli= ght > > type? > >=20 > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43@g= mail.com/ >=20 > Hi all, >=20 > So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, KBLC s= ets > BIT(0) first (RETD |=3D 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 >=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 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) =3D=3D 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) =3D=3D 0= ) this cycle and defer the KBLC(KBD_BL_QUERY_TYPE) =3D=3D 1 case until the ne= xt cycle to see if we can get more information. Thanks, Rong >=20 > Thanks, > Punnay