Repository navigation
drm: google: 120 Hz on the Pixel 9a (per-panel DSIM timers, gs-decon on zumapro) - #88
Conversation
|
Thank you, this is a tidy way to do it: picking the timer set from the timers the bootloader left means the 9a's set can only ever be used on a link that already runs with it. I went through it closely because gs-dsim-cmd and gs-decon drive my Pixel 7 Pro's panel every day. What I checked:
One structural ask, from the rule now in CONTRIBUTING §6.2 for drivers several phones share: the 7 Pro's display is fully working, so I'd rather its path not change at all than test that it didn't. Could the per-panel timer table and its lookup sit behind zumapro's match data (a field in the zumapro driver data, or a quirk flag), with the gs201 path left as it is today? Then the 7 Pro's functions build byte-identical and nothing needs a run on my phone. If you'd rather keep one shared lookup because it's cleaner upstream, that's fine too, but then I'll run your gs-dsim-cmd commit on my phone before merging; say which you prefer. A few things I'd like changed:
Thanks again, 120 Hz on the 9a is a lovely thing to see. |
|
Thanks for going through it so closely. Pushed, rebased onto today's
checkpatch --strict is clean on both, and both objects build with W=1. |
d6e0dff to
0caf5f7
Compare
|
Thank you for working through every point so quickly. I checked the new head against each of them:
On the structure: that's fine, I'll keep my side of it. I rebuilt both objects at today's base and with your branch: on the 7 Pro the code reads the same as before (its pair is the first set, byte for byte, and the bootloader's timers select it), but four functions in gs-dsim-cmd change, so I'll run your first commit on my Pixel 7 Pro (boot, refresh-rate readout, DPMS off and on, lock and unlock, and a 60/120 Hz switch) and merge once that's clean. Nothing more is needed from you here; I'll report back in this thread. |
The 60 and 120 Hz link timers (the underrun timeout and the TE timeouts) depend on the panel's timings and the link rate, and the table had only the Pixel 7 Pro's. Make it one set per panel, and pick the set at probe from the timers the bootloader left, as the 60 Hz entry was found before. Add the Pixel 9a's tg4c panel: its 60 Hz pair is the one its bootloader leaves (underrun 0x18c8, TE_CTRL1 0x2a82306d, a word clock of about 68.75 MHz on 1100 Mbit/s lanes), and its 120 Hz pair follows Google's dsim_calc_underrun() the same way the Pixel 7 Pro's does: half the TE timeouts, and the 60 Hz underrun less the frame time saved. Its 120 Hz underrun (0x2a0) is derived from the bootloader's 60 Hz value in the same way. Google's dsim_calc_underrun() with tg4c's parameters would give 0x69c at 120 Hz (0x1cc4 at 60 Hz, not the bootloader's 0x18c8), leaving more LP time; the derived value leaves about 1 ms. Tested on the Pixel 9a: the 60 Hz timers are recognised at probe, the desktop switches to 120 Hz and back, 602 frames in 5 s at 120 Hz with no underruns, and a minute of workspace switching at 120 Hz (67 round trips) left DSIM INTSRC's underrun bit (19) clear, read before and after. The tested gs-dsim-cmd.c (blob e6cbc14174a3) differs from this one only in comments and one continuation line's indentation. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
Offer the Pixel 9a's 120 Hz mode beside the bootloader's 60 Hz one, with TG4B/TG4C's timings (TG4A's porches differ; DECON only needs the active size and the totals). On gs201 the switch to 120 Hz raises the MIF and DISP floors first, and gs-decon only offers it when the board gives those clocks. The 9a's bootloader already leaves MIF at 2028 MHz and DISP at 400 MHz, above the 120 Hz floors, so on zumapro the floor clocks are optional (floors_optional): 120 Hz is offered without them, and they are still used when a board names them. Nothing in Linux keeps MIF and DISP above the floors on the 9a; it works because nothing lowers them yet, so the rates need a fresh look once ACPM DVFS or suspend changes them. Tested on the Pixel 9a with the tg4c timers from the previous commit: the desktop runs at 120 Hz (602 frames in 5 s, no underruns), drops to 60 Hz with the panel asleep on DPMS off, and comes back at 120 Hz. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
0caf5f7 to
b08877b
Compare
|
A short status, since this has been waiting on me. Nothing is needed from you. Both commits, and the |
|
Ran both commits on my Pixel 7 Pro tonight ( |
Two changes so the Pixel 9a's display runs at 120 Hz on your gs-dsim-cmd and gs-decon.
dsim_calc_underrun()the way the 7 Pro's does: half the TE timeouts, and the 60 Hz underrun less the frame time saved.floors_optionallets zumapro offer 120 Hz without MIF/DISP floor clocks. The 9a's bootloader leaves MIF at 2028 MHz and DISP at 400 MHz, already above the 120 Hz floors, and the ACPM clocks come up too late to be DECON inputs. A board that names the clocks still gets them used.On the 9a (
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, running these two files now):gs-dsim-cmd 19440000.dsi: link timers for 60 Hzat probe;1080x2424: 120in the DRM state), 602 frames in 5 s with no underruns;The Pixel 7 Pro's pair is unchanged and still matched first. checkpatch --strict is clean on both commits, and both objects build with W=1. The tg4c panel driver and the 9a's display DT follow separately.