Repository navigation
drm/panel: google-tg4c: Add local high brightness mode - #126
Conversation
…was masked Review: the status says it works on the owner's integration kernel, with LHBM open as derekross/linux-omarchy-mobile#126 and the DSI reads as derekross#125, and the fprintd mask came from the palmtop's private bring-up root. The G3 next step is on the charger.
|
Thank you, @W4HO-ham. A working fingerprint unlock on the 9a is a big step. The patch is easy to check against Google's file. I compared it with The checks pass on today's Two fixes to the timer, and one question about evidence:
One thing for later, not for this PR: nothing in the omarchy-mobile packages sets Thanks again. The overdrive finding alone will save whoever brings up the next Google panel some time. |
fb8d258 to
798fcb4
Compare
|
Thanks, both timer points were real. Fixed at 798fcb4 (force-pushed, one commit):
Checked on the palmtop with this head's module (built out of tree against the running kernel, blob
For the record, the boot in question: release |
|
Thank you, @W4HO-ham. Both timer fixes are right, and the test you ran shows each one: the second circle survived past the point where the first circle's timer used to end it, and turned off at 3.5 s. I read the new head against my two points:
The checks pass on today's What's left is the run you mentioned: the match and refuse tests with this head's file, the release, and a Thanks again. This was a quick and clean turnaround. |
|
The one-minute repeat on the rebuilt panel module (updates/panel, blob d591bc3d1bf1, release 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty), 2026-10-30 morning on the palmtop: locked with the power key, the enrolled finger lit the LHBM circle and unlocked on the first press; locked again, three presses of a wrong finger each lit the circle and were refused (the HAL's dismatch with image quality 24, valid area 100), then the right finger matched on one press. The bridge's FINGER DOWN / ACQUIRED / FINGER UP sequence ran cleanly every time and local_hbm_mode read 0 again afterwards. One thing found on the way, not this driver's fault: after the shell's power-key off-and-on, the backlight device stayed in its blank state (bl_power 4, and the core's FBBLANK bit even after bl_power was set back to 0) while the panel was lit, so local_hbm_mode refused with EPERM (the allow_lhbm/brightness check reads brightness as 0 while blank) and no circle came. A DPMS off/on through Hyprland cleared it and everything above ran. I'll take that to the shell's power-key path on the omarchy-mobile side. |
|
Thank you, @W4HO-ham. The match and the three refusals with |
The Pixel 9a's under-display fingerprint sensor needs the panel to light the finger: local high brightness mode (LHBM), a bright circle over the sensor. Add it as Google's panel-gs-tg4c.c does it, and expose it as their panels do, through local_hbm_mode and local_hbm_max_timeout on the backlight device, which the fingerprint HAL uses. Turning it on selects CMD2 page 2, sets the LHBM gamma for the current brightness (0x6F 0x07, then 0x87 0x01-0x04 by Google's thresholds) and writes 0x87 0x05; 0x87 0x00 turns it off. The circle keeps the panel's own per-band LHBM brightness. Google raises those by an overdrive offset for the first frames and then writes the panel's values back; with the overdrive kept on, the sensor's captures were too poor to match, and with the panel's values they match. LHBM needs the panel on and at 120 Hz, as on stock, so it is refused otherwise, turned off before a switch away from 120 Hz or the panel turning off, and turned off by a timer after 3 s. The timer belongs to the current circle: turning LHBM on restarts it and turning it off cancels it, so an earlier circle's timer can't cut a new one short. On remove the attributes go first, then the circle is turned off and the timer stopped, so nothing can queue it afterwards. It is off unless the allow_lhbm module parameter is set. Tested on the Pixel 9a: with the fingerprint stack running, the enrolled finger matches and a different finger is refused, and the lock screen unlocks by fingerprint. The tested panel-google-tg4c.c is this commit's file (blob d591bc3). Link: https://android.googlesource.com/kernel/google-modules/display/panels/tegu/+/e3a801fb038fdd1bbaec36d387f27bd99f10757a/panel-gs-tg4c.c Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
798fcb4 to
cac4fc3
Compare
This adds the fingerprint circle to the Pixel 9a's panel. Local high brightness mode is set up the way Google's
panel-gs-tg4c.cdoes it (CMD2 page 2, the LHBM gamma for the current brightness, then0x87 0x05). It's exposed throughlocal_hbm_modeandlocal_hbm_max_timeouton the backlight device, which the fingerprint HAL uses, and the new ABI file documents both. It's off unlessallow_lhbmis set, and it's refused unless the panel is on at 120 Hz. It turns off after 3 s, when the panel turns off, and before a switch away from 120 Hz.One finding is in the message: Google overdrives the circle only for its first frames and then goes back to the panel's own bands. Keeping the overdrive on gave captures too poor to match. With the panel's own bands, matching works. So this version doesn't overdrive at all, and it doesn't need DCS reads (#125).
Tested on the palmtop on 2026-10-29: the enrolled finger matches and a different finger is refused, through the HAL and through fprintd, and the lock screen unlocks by fingerprint. The userspace side is in derekross/omarchy-mobile#135. checkpatch
--strictis clean, and the file builds W=1 clean against the integration tree.