From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796302938; b=HqCaamIuyBk7Mg2dgArdonma0ZEHNGa7z15/pejhuTdCZ0gsAjoeoTlpsHk6zOsiCnr9 P6SNgy+T4J/7BUbLkJ0R+i9ioV1lA/mCd7S6y1vBtqUYaSNXRXzZqIy6GjywOTg8kmeRM NRGgYNe2ykKDQkFdNnF64AnLeg2q4E9yKz3YIs6xfdvXJECMHwg51LMMp9WUrhPOJFqcN kTUUclo425eaK2vo6rrT/VLbvRp4rwJYiPSg1q5L6mPwKuEVGAxcSmPRz1okgoeP+rcDq e6EstL4eLvsrXmDOUdrxyT4Rlku4A9nFr8lWeVS1TjA80CLtfUEwB+CouIdjWBggd+A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796302938; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:From:Date:To:cc: Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type; bh=/D5fyDvpFVTEt9+4X/NkOfYbbg6TMmnmxNQapqepop0=; b=g1lgYgHg038NRSeYUBeUrfWXBsFNTnvLN500NI1gmLOGHrPRDMBDJmzDvNDKqMjPmqCd lRGZDSleRS3bOmb2jsMXDlKQ4RSSSfigN+AcDUvsudC50pcimV07PwRdrVSb7MbQoE7vS AO54oCo2d/Jvq8MiBj0CbGmS6PoAelLkagyAdY70a82qisgBJdYfabV71uLtvKtFv0mAw xyw76uF78rxLlg1S61gLyrlqc5sC1TW+6EaJ3Sn+MfLLsxRZzeF61q5svCvsLnVNBs+xT lCO3kCVhK8WwZROt0Ys4d/3Ie0FDytZaBJcvjT8a5pQsaM0+QZt8TgjirI5TPahVqiQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GGzaIJvX; arc=none smtp.remote-ip=198.175.65.11 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63EFF606A322; Thu, 3 Dec 2026 13:02:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 63EFF606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GGzaIJvX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796302938; x=1827838938; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=/D5fyDvpFVTEt9+4X/NkOfYbbg6TMmnmxNQapqepop0=; b=GGzaIJvXv46EKh2JoduuxXW+P7Mu6WkcBzjODlPqSOXzt/KYLu2rzONe Rq/EJ5M95Am/DifRb6X8i0HLOr5M5r2EwI7XeVCEIfVHu4ItL/9G+prVB NH/V6ZV1mEFVa/BWs43v3ZONF4EFcHz84kw2S769yu9vA8LM7OpBBTKfR hRt3MKrrX04CSDcMfRzXVMX2Nv4ydTMgRCe1n7USQ2hrovIcKeauG2B8J 4fhdD5YdOA05ew2uCWrnDNIk+fvQTKy4DNXOTH3DC913F+NjxWiHdLT4p GA9HiqRl1AHd8B370qOLpTOizvdljmvvWN/xxV2euTw0kOBD6sWUX7NEx Q==; X-CSE-ConnectionGUID: vHM+6xf0SsCqYS9ate9XIA== X-CSE-MsgGUID: pIjqNozmTWi+v2iexf3K0g== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5160220" X-IronPort-AV: E=Sophos;i="6.29,248,1794902400"; d="scan'208";a="5160220" Received: from fmviesa013.fm.intel.com ([10.60.135.153]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 05:02:17 -0800 X-CSE-ConnectionGUID: Z4fJEzWdRSWW5wSXO1lW0A== X-CSE-MsgGUID: lBjITl3qSjiiPnXxkCYR5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,248,1794902400"; d="scan'208";a="15781834" Received: from ijarvine-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.244.113]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 05:02:13 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 3 Dec 2026 15:02:08 +0200 (EET) To: Rong Zhang 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 Subject: Re: [PATCH] platform/x86: ideapad-laptop: Do not warn if KBLC reports no backlight In-Reply-To: Message-ID: <5c787d5d-ae91-a98d-e742-c0e51258e9dd@linux.intel.com> References: <20261107140700.16036-1-punnaysharma805@gmail.com> <43b41d16-499f-b3bb-82f3-ea82f7ea99db@linux.intel.com> 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 Content-Type: multipart/mixed; boundary="8323328-1833901263-1796302928=:1363" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1833901263-1796302928=:1363 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 3 Dec 2026, Rong Zhang wrote: > 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 rep= orts > > > [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 seems > 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. 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. 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. --=20 i. > > > If not, > > > why are we using that bit while reporting an error about unknown back= light > > > type? > > >=20 > > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43= @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 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 >=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 entry > 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 --=20 i. --8323328-1833901263-1796302928=:1363--