Skip to content

msm: report the current GPU clock and the temperature - #527

Open
fromdisposition wants to merge 2 commits into
Syllo:masterfrom
fromdisposition:msm-clock-temperature
Open

fromdisposition wants to merge 2 commits into
Syllo:masterfrom
fromdisposition:msm-clock-temperature

Conversation

@fromdisposition

Copy link
Copy Markdown

The msm DRM interface has no query for the current GPU clock or temperature, so the msm backend shows the max clock as the current one and no temperature at all (see #204).

This reads both from sysfs: the clock from the GPU's devfreq, and the temperature from the hottest GPU thermal zone, such as gpu-top-thermal. The devfreq is matched on the qcom,adreno compatible, so the GMU is skipped. If a reading is unavailable, nvtop shows N/A for that field.

Tested at idle and under load. The reported clock and temperature match the corresponding sysfs readings.

The driver has no query for either. Read the clock from the GPU's
devfreq, the one whose compatible lists the generic "qcom,adreno", so
the GMU is skipped, and the temperature from the hottest thermal zone
whose type starts with "gpu", as the Qualcomm NPU backend does for
"nsp". Without a devfreq the current clock is left unknown instead of
showing the maximum.
The previous commit reads the GPU temperature from its thermal zones, so
the MSM message no longer lists the temperature as missing.
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