Skip to content

profile-tv skill: Mali T820 clock, driver utilization and bench-miss facts - #967

Merged
GLinnik21 merged 5 commits into
mainfrom
skills/profile-tv-mali-t820-facts
Oct 24, 2026
Merged

GLinnik21 merged 5 commits into
mainfrom
skills/profile-tv-mali-t820-facts

Conversation

@GLinnik21

@GLinnik21 GLinnik21 commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a ## Mali T820 facts for reading the counters section to .agents/skills/profile-tv/SKILL.md (just before ## What counts as verification) and annotates the older prose that the same facts contradict. Four docs files get a dated parenthetical; nothing else is rewritten. Docs only, no device touched, no code changed.

The new skill section

  • GPU clock fixed at 672 MHz, no GPU DVFS. From the TV's own mali_kbase.ko (Midgard r12p0): the kbase_platform_device_probe frequency limits, the clock/regulator/OPP/devfreq imports it does and does not have, dvfs_callback -> kbase_pm_get_dvfs_action, and the kernel clock tree. It also gives the GPU_ACTIVE cycles-to-time conversion (one 60 Hz refresh is about 11.2M cycles, shared with the compositor).
  • Driver GPU busy %, without HWCNT's glFinish serialization. From the Mali debugfs gpu_utilization node, checked against a Home grid-pong control run and HWCNT. The steps are one runnable sequence for the TV's busybox sh: mount debugfs only if /proc/mounts does not list it (and remember whether this run did), one-shot read, a 10 Hz sampler started in the background writing to an absolute /tmp path with its pid recorded, stop by killing that pid, and unmount only if this run mounted it. It follows the mount-if-absent / pid-file idiom of tools/tv-sched-trace.sh. I ran it under dash (strict POSIX) with stubbed mount/umount/usleep, as one shell and as one shell per step, in both the unmounted and the already-mounted case; it was not run on busybox or the TV. The section keeps the warning that the sampler disturbs the bench: in one run (22 misses against 9 for the same control without it) it roughly doubled them, so misses are never graded from a sampled run.
  • CPU and thermal. From LG's power manager files under /proc/lg/pm/ and the Glasshouse dashboard's /api/stats on the TV's port 8080, plus a control run at a flat 39-42 °C with the CPU pinned at its maximum.
  • Reading plxnative-herobench misses. From the HWCNT and plxnative-drawmask runs of 2026-10-24 on Home hero-pong and grid-pong:
  • Home pong census. From the same release-build drawmask runs: GPU_ACTIVE saved per frame by removing one draw class.

The section points at docs/backdrop-blur-profiling.md for plxnative-drawmask usage instead of restating it. Every repo identifier it cites (late_probe in rust-modules/gfx/src/egl.rs, the egl surface (after 120 presents) log line, plxnative-drawmask with all/glass/comma lists, plxnative-herobench, hero-pong/grid-pong) was grepped on origin/main.

The older prose that is annotated

Each is a dated "(2026-10-24: ...)" parenthetical beside the sentence it corrects, pointing at the new section; the original sentence stays so the record of what was believed is kept:

  • docs/backdrop-blur-profiling.md: "no GPU clock node anywhere", the "GPU DVFS / clock scaling" explanations for the source pass, the Detail frame misses and the Home capture stall (six places).
  • docs/glass-hardware-budget.md: "no temperature sensor and no GPU clock at all" and the "cold television" limitation.
  • docs/perf-view-buffers-and-thermal.md: the "exposes no temperature sensor and no GPU clock" quote and the suggestion to build a thermometer probe.
  • tests/README.md: the thermal-hypothesis note (a temperature can be read after all, from LG's power manager).

No linked issue: findings from a Home pong frame-drop investigation.

Verification

Docs only, so no make check (CI gates it). On the committed tree, with git status --short empty after:

  • python3 ci/check-placeholders.py: check-placeholders: ok (38 references: 23 counted, 15 exempt with a reason)
  • python3 ci/test_ci_workflows.py: Ran 77 tests in 3.076s / OK
  • python3 ci/test_source_bundle.py: Ran 43 tests in 4.519s / OK
  • python3 .claude/hooks/outbound-guard-test.py: outbound-guard: 68/68 checks correct

No device was touched. The measured numbers are the ones from the 2026-10-24 investigation and #980's device runs, and were not re-measured for this PR.

🤖 Generated with Claude Code

GLinnik21 and others added 5 commits October 24, 2026 04:00
…facts

Add "Mali T820 facts for reading the counters" before "What counts as
verification": the GPU clock is fixed at 672 MHz (no DVFS in the TV's
mali_kbase.ko), the driver's debugfs gpu_utilization read-out as a
glFinish-free busy %, CPU/thermal facts, how to read plxnative-herobench
misses (the one-shot EGL_BUFFER_AGE swap in cycle 1, the miss rate above
~8M GPU_ACTIVE, the glass source pass, the bimodal Home p95), and the
Home pong drawmask census.

Docs only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The profile-tv "Mali T820 facts" section established that the GPU clock is
fixed at 672 MHz (mali_kbase.ko declares it and has no clock-setting path;
debugfs mali0/gpu_utilization agrees). Dated entries elsewhere still said the
clock could not be known, or listed GPU DVFS / clock scaling as an open
explanation for the pacing and warm-cycle misses.

Add a short dated correction after each false statement in
docs/backdrop-blur-profiling.md, docs/glass-hardware-budget.md and
docs/perf-view-buffers-and-thermal.md, leaving the original entries in place as
the record. Sentences that are only literally true (no clock node in sysfs) are
left alone.

Also fix the profile-tv skill's gpu_utilization sampler note: the 10 Hz sampler
is not out of the measurement for misses, it roughly doubles bench misses
(22 vs 9 on the same panel-off control). Its utilization figures are valid;
misses must come from a run without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ature and CPU frequency)

Several notes said the set has no temperature sensor or thermometer, or that the
CPU frequency cannot be observed. LG's power manager reports the SoC
temperature in /proc/lg/pm/temperature (also the `temp:` line of
/proc/lg/pm/status) and the current CPU frequency in /proc/lg/pm/frequency
(bounds in /proc/lg/pm/tune/). What stays true: there is no thermal_zone and no
cpufreq sysfs.

Add a dated correction after each false statement in
docs/glass-hardware-budget.md (sections 7 and 10),
docs/perf-view-buffers-and-thermal.md (Q2 banner and the thermometer
paragraph) and tests/README.md, keeping the true sysfs statements. List
/proc/lg/pm/frequency in the profile-tv skill's CPU and thermal section so the
corrections have a source to point at.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s steps run in order

Reading the PR against main after #980:

- Bullet (a) said every run's cycle 1 has a 13-16 ms swap from
  plx_gfx::egl::late_probe(). Since #980 that EGL_BUFFER_AGE query runs only
  with the eglage dev trigger armed, so an unarmed run has neither the stall
  nor the "egl surface (after 120 presents)" line. (a) now says a build from
  before #980 had the block, that a current build has it only armed, and that
  a cycle-1 miss on an unarmed build is something else (a first-time upload,
  prepare= with a large px=; first-time text raster, textx4). No other claim
  in the diff names that probe: the "probe kick" and "ground probe" mentions
  are the glass ground-probe readback, a different mechanism.
- The debugfs steps are one runnable sequence: mount only if /proc/mounts does
  not list it and remember whether this run did, one-shot read, the 10 Hz
  sampler started in the background writing to an absolute /tmp path with its
  pid recorded, stop by killing that pid, unmount only if this run mounted
  it. The old block mounted, read and unmounted; the loop after it read the
  unmounted node, ran in the foreground forever, wrote to a relative `log`
  and had no stop step. Checked under dash (strict POSIX) with stubbed
  mount/umount/usleep, both as one shell and as one shell per step; not run
  on busybox or the TV.
- "Roughly doubles" rested on one run (22 misses against 9); it now says so.
- The "control spread 7-14" in bullet (b) is now 7-15 and names its sources:
  hero-pong 14, 7, 9 and grid-pong 15, 11, 9 (#980's device runs, 2026-10-24),
  and grid-pong 8, 9, 13, 14 (the controls above).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 45de3e7 into main Oct 24, 2026
15 checks passed
@GLinnik21
GLinnik21 deleted the skills/profile-tv-mali-t820-facts branch October 24, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant