Repository navigation
drm/panel: Add the Google TG4C panel (Pixel 9a) - #89
Conversation
|
Thank you for the panel driver. It's small and easy to follow, and I checked it against Google's One thing has to change before merging, and a couple of smaller ones:
Smaller, optional: As on #88, the test kernel isn't in a tree I can see, so the blob id of the I'll also ask a question about the panel on #90 that touches this driver: which panel the bootloader reports on your 9a. |
The TG4C is the 1080x2424 command-mode AMOLED panel of the Google Pixel 9a, on four DSI lanes with a TE line, at 60 or 120 Hz. Google drives it with DSC 1.2, two 540x24 slices at 8 bits per pixel. Its supplies and reset follow Google's tegu device tree (vci, vddi, vddd, reset), as the S6E3HC4's do. Link: https://android.googlesource.com/kernel/devices/google/tegu/+/6276884d9940694b25a6934671918ec8ac412ee8/dts/zuma-tegu-connector.dtsi 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>
Add a driver for the Google Pixel 9a's TG4C command-mode AMOLED panel. The bootloader powers the panel, initialises it and leaves it running at 60 Hz; the driver takes it over as it is, as the S6E3HC4 driver does, and never resets it or touches its supplies: - sleep in and out around a power cycle of the display pipeline, keeping the panel's registers; - 60 and 120 Hz through drm_panel_set_refresh_rate() (0x2f 0x02 and 0x2f 0x00, Google's tg4c_change_frequency()); - the brightness as a DCS backlight over Google's normal range, levels 1 to 3628 (up to 1200 nits), with Google's default of 1829. The levels above 3628 are high brightness mode and are left for a later control of their own. Command sequences, modes and sizes from Google's MIT-licensed panel driver. Tested on the Pixel 9a (7.3.0-rc6-omamobile-tegu-s2mpg15-m1, this file at blob 19c89b1, which used 4095 as maximum and default) with gs-dsim-cmd and gs-decon: the desktop runs at 120 Hz, DPMS off puts the panel to sleep and DPMS on wakes it, and the brightness follows the backlight across its range. This version changes only the brightness range and default and the physical size, and drops an unused flag. 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>
|
Thanks, all three done and pushed:
I also took the two optional ones: The file I tested on the 9a is blob 19c89b162a5e (7.3.0-rc6-omamobile-tegu-s2mpg15-m1), the version before these changes, with 4095 as maximum and default. This push differs from it only in the brightness constants, the mode size and the dropped flag. checkpatch --strict is clean apart from the usual MAINTAINERS note on the binding patch (the driver patch adds the entry), the W=1 build is clean, and dt_binding_check passes. I'll load this version at the palmtop's next reboot and confirm the 1829 default after a DPMS cycle. |
f820525 to
223b98a
Compare
|
Thank you, all three are done, and the two optional ones as well. I checked:
Gates are clean here (checkpatch, the W=1 build, and the binding in CI), and with this binding merged in, the 9a's device tree from #90 validates with no messages. This is ready to merge. When the 9a next reboots, a line here confirming the 1829 default after a DPMS cycle would be nice to have on record, but I won't hold the merge for it, since the change only lowers the range. |
A driver for the Pixel 9a's TG4C command-mode AMOLED panel, built like your S6E3HC4 one. The bootloader powers the panel, initialises it and leaves it running at 60 Hz. The driver takes it over as it is and never resets it or touches its supplies:
drm_panel_set_refresh_rate()(0x2f 0x02 and 0x2f 0x00, from Google'stg4c_change_frequency());Command sequences are from Google's GPL
panel-gs-tg4c.c. The binding gives the supplies and reset Google's tegu DT gives the panel (vci, vddi, vddd, reset), with the same names as the S6E3HC4's. The driver doesn't use them yet, so they're optional.Tested on the Pixel 9a (
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, this file built as a module, the DT's panel node switched togoogle,tg4c, with #88's gs-dsim-cmd and gs-decon):19440000.dsi.0, and the desktop comes up at 120 Hz;Left out: the panel's local high-brightness mode, the fingerprint circle. That needs an interface of its own, and it can come with fingerprint support.
checkpatch --strict is clean on the driver commit. The binding commit gets only the MAINTAINERS question, which the driver commit answers with an entry.
dt_binding_checkpasses, and the driver builds with W=1.