Repository navigation
drm/panel: google-tg4c: Accept the TG4C build that reads ID3 0x40 - #212
Conversation
|
Thanks for tracking this down. Reading the bootloader's panel name as the I also checked Google's Two things before I merge:
A small one: the comment above |
Commit 77ea6af ("drm/panel: google-tg4c: Send no commands to a panel that is not a TG4C") takes a panel whose ID3 is not 0x00 for another panel and sends it nothing. A second Pixel 9a reads ID 04 80 40 2d, and its bootloader passes exynos_drm.panel_name=google-tg4c.2d408004 -- the same four bytes, so ABL itself identifies this panel as a TG4C. With the check failing, every backlight write and every 60/120 Hz switch on that phone returned -ENODEV: panel-google-tg4c 19440000.dsi.0: panel ID 04 80 40 2d is not a TG4C's: sending it no commands gs-dsim-cmd 19440000.dsi: switching from 60 to 120 Hz failed: -19 Accept ID3 0x40 as well. ID1 is still checked and ID3 must be one of the two values seen on TG4C panels, so any other ID still gets no commands. Google's panel-gs-tg4c.c treats the two builds the same: its tg4c_get_panel_rev() picks the command revisions from the build code in 0xDB alone, and that byte is 0x80 on both panels, so Google's own driver sends this panel exactly the TG4C commands. Tested on a Pixel 9a (tegu, panel ID 04 80 40 2d) with 7.3.0-rc6-omamobile-push1-ge8d722982099, whose panel-google-tg4c.c is this commit's (blob 8901b8f): - the "not a TG4C" message is gone, and writing 600 and then 3000 to /sys/class/backlight/19440000.dsi.0/brightness succeeds instead of failing with -ENODEV; - the refresh rate, switched from Hyprland 120 -> 60 -> 120 -> 60 -> 120 Hz: gs-decon logs each switch with no error, and with a terminal redrawing every frame the DECON frame-start interrupt counts 120, 60, 121, 60 and 121 a second; - the display off and on (DPMS) at 60 Hz and at 120 Hz: the frames come back at the same rate and the next brightness write succeeds; - LHBM at 120 Hz with allow_lhbm=1: local_hbm_mode reads 1 after writing 1 and 0 after writing 0, with no error, and a switch to 60 Hz ends it (the circle itself was not looked at). Assisted-by: Claude:claude-opus-5-5 Signed-off-by: cbm <omarchy-mobile@kloot.lu>
1382c28 to
42ceec3
Compare
|
Thanks for checking
|
|
Thank you, this is everything I asked for, and more carefully than I asked I re-read Google's The gate passes merged onto today's |
What
tg4c_check_id()(77ea6af, "Send no commands to a panel that is not a TG4C") only accepts ID30x00. The TG4C on a second Pixel 9a reads ID04 80 40 2d(ID30x40), so the driver takes it for another panel and sends it no commands at all. On that phone every backlight write and every 60/120 Hz switch fails with-ENODEV:Why it is a TG4C
The bootloader passes
exynos_drm.panel_name=google-tg4c.2d408004on this phone: the same four ID bytes, read the other way round. So ABL itself identifies the panel as a TG4C; it is just a different panel build from the palmtop's.Change
Accept ID3
0x40as well (TG4C_ID3_ALT). ID1 is still checked and ID3 must be one of the two values seen on TG4C panels, so any other ID still gets no commands. No change for a panel that reads ID30x00.Tested
04 80 40 2d, slot B, Omarchy Mobile root built from main0e32235.7.3.0-rc6-omamobile-push1-g5fd76e2b140a. To be transparent: that test kernel isomamobileat 29a7a93 plus Pixel 9a (zumapro): Wi-Fi PCIe on the shared gs201 host and zuma PHY drivers, stacked on #156 #178 (Wi-Fi, with Pixel 8 Pro Wi-Fi: zuma's PCIe and the BCM4398 (stacked on #153, #143, #56) #156/wifi: brcmfmac: shared-memory version 9 firmware, and the BCM4383 (Pixel 9a) #56 andCONFIG_PHY_ZUMA_PCIE=mfrom omarchy-mobile#274), media: gs201-csis, s5kgn1, MAINTAINERS: follow-ups to #63 #103, and the camera DT commits of Pixel 9a (zumapro): the three cameras from the device tree #164. The panel change itself is this one commit, rebased here onto the currentomamobile(25368bf) with no conflicts.echo 600 > /sys/class/backlight/19440000.dsi.0/brightness→No such device; 60→120 Hz switches fail with -19.brightnessfile succeeds.0x00.omamobilekernel):systemd-backlight@backlight:19440000.dsi.0fails withOperation not permitted, because it restores the brightness beforegs_dsim_cmd.allow_txis set. It shows in the smoke report below.Checks
tools/kernel-pr-check --build OUT origin/omamobile HEAD(omarchy-mobile0e32235, in the project container): all ok. checkpatch--strict: 0 errors, 1 warning (COMMIT_LOG_LONG_LINE for the quoted commit title, kept unwrapped as usual).phone-smoke (after the change)
AI assistance
The investigation, the patch and this description were done with Claude (Anthropic), credited with
Assisted-byin the commit. The tests above ran on the owner's phone, and the owner signed off.