Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ Example output:
<th colspan="2">Intel Discrete</th>
<th>Intel Integrated</th>
<th>Panfrost/Panthor driver</th>
<th colspan="2">Qualcomm</th>
</tr>
<tr>
<th></th>
Expand All @@ -570,6 +571,8 @@ Example output:
<th>xe</th>
<th>i915/xe</th>
<th></th>
<th>msm_drm (kgsl)</th>
<th>msm_dpu</th>
</tr>
<tr>
<td>Usage%</td>
Expand All @@ -579,6 +582,8 @@ Example output:
<td>🟢</td>
<td>🟢</td>
<td>🟢</td>
<td>🟢</td>
<td>🟢</td>
</tr>
<tr>
<td>Temperature</td>
Expand All @@ -588,6 +593,8 @@ Example output:
<td>🟢</td>
<td>🔴</td>
<td>🟢</td>
<td>🟢</td>
<td>🟢</td>
</tr>
<tr>
<td>Junction Temperature</td>
Expand All @@ -597,6 +604,8 @@ Example output:
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
<tr>
<td>Memory Temperature</td>
Expand All @@ -606,6 +615,8 @@ Example output:
<td>🟢</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
<tr>
<td>Process VRAM</td>
Expand All @@ -615,6 +626,8 @@ Example output:
<td>🟢</td>
<td>🟢</td>
<td>🟢</td>
<td>🔴</td>
<td>🟢</td>
</tr>
<tr>
<td>System VRAM</td>
Expand All @@ -624,6 +637,8 @@ Example output:
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
<tr>
<td>Total VRAM</td>
Expand All @@ -633,6 +648,8 @@ Example output:
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
<tr>
<td>Memory Clock</td>
Expand All @@ -642,6 +659,8 @@ Example output:
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
<tr>
<td>Core Clock</td>
Expand All @@ -651,6 +670,8 @@ Example output:
<td>🟢</td>
<td>🟢</td>
<td>🟢</td>
<td>🟢</td>
<td>🔴</td>
</tr>
<tr>
<td>Power Usage</td>
Expand All @@ -660,6 +681,8 @@ Example output:
<td>🟢</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
<tr>
<td>Throttling Status</td>
Expand All @@ -669,6 +692,8 @@ Example output:
<td>🟢</td>
<td>🟢</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
<tr>
<td>Fan Speed</td>
Expand All @@ -678,6 +703,8 @@ Example output:
<td>🟢</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
<tr>
<td>Voltage</td>
Expand All @@ -687,6 +714,8 @@ Example output:
<td>🟢</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
<td>🔴</td>
</tr>
</table>

Expand All @@ -703,3 +732,6 @@ Example output:
#### Panfrost and Panthor notes
- GPU usage requires `echo N | sudo tee /sys/class/drm/renderD*/device/profiling`
- Where N is a number, 1 for panfrost and 3 for panthor.

#### Qualcomm notes
- GPU usage on `msm_dpu` shows usage of the current process, not total system usage
4 changes: 4 additions & 0 deletions mangohud-next/server/metrics/gpu/msm/dpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ int MSM_DPU::get_process_load(pid_t pid) {

return static_cast<int>(::lroundf(result));
}

float MSM_DPU::get_process_vram_used(pid_t pid) {
return fdinfo.get_memory_used(pid, "drm-resident-memory");
}
1 change: 1 addition & 0 deletions mangohud-next/server/metrics/gpu/msm/dpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ class MSM_DPU : public GPU, private Hwmon, public FDInfo {

// Process-related functions
int get_process_load(pid_t pid) override;
float get_process_vram_used(pid_t pid) override;
};
7 changes: 6 additions & 1 deletion src/gpu_fdinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ void GPU_fdinfo::find_fd()
client_id = val;
}

// fixup mismatch between display engine and render engine drivers
if (module == "msm_dpu" && driver == "msm") {
driver = "msm_dpu";
}

if (!driver.empty() && driver == module) {
total++;
SPDLOG_TRACE(
Expand Down Expand Up @@ -175,7 +180,7 @@ void GPU_fdinfo::find_hwmon_sensors()
{
std::string hwmon;

if (module == "msm")
if (module == "msm_dpu")
hwmon = find_hwmon_sensor_dir("gpu");
else if (module == "panfrost" || module == "panthor")
hwmon = find_hwmon_sensor_dir("gpu_thermal");
Expand Down
2 changes: 1 addition & 1 deletion src/gpu_fdinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ class GPU_fdinfo {
drm_engine_type = "drm-engine-gfx";
drm_memory_type = "drm-memory-vram";
} else if (module == "msm_dpu") {
// msm driver does not report vram usage
drm_engine_type = "drm-engine-gpu";
drm_memory_type = "drm-resident-memory";
} else if (module == "msm_drm") {
init_kgsl();
} else if (module == "panfrost") {
Expand Down
Loading