Skip to content

Conversation

@pdapandapda
Copy link

Added codes to support panthor drm driver introduce to kernel newer than 6.10. work on rk3588 with MaliG610 right now.

@17314642
Copy link
Contributor

17314642 commented Aug 26, 2025

  1. why get_gpu_time_panthor exists? it's just a copy of get_gpu_time
    get_gpu_time_panfrost exists because it needs two values to calculate usage, but it's not the case with panthor
  2. i think it's better to rename get_gpu_clock_panfrost to get_gpu_clock_mali and add mali_gpu_clock_fdinfo_key variable in gpu_fdinfo.h and make get_gpu_clock_mali use it to avoid duplicate code

otherwise everything good

@flightlessmango
Copy link
Owner

These commits can be squashed

combine get_gpu_time_panthor into get_gpu_time
README.md Outdated

#### Panfrost notes
- GPU usage requires `echo 1 | sudo tee /sys/class/drm/renderD*/device/profiling`
- If your linux kenel is newer than 6.10 and using "Panthor" drm driver,requires `echo 3 | sudo tee /sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profiling`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this 100% needed? are there no profiling file inside /sys/class/drm/renderD*/device like with panfrost?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo 1 | sudo tee /sys/class/drm/renderD*/device/profiling would not work with panthor, official document shows the new address https://docs.kernel.org/gpu/panthor.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo <N> > /sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profiling
echo <N> > /sys/bus/platform/drivers/panfrost/[a-f0-9]*.gpu/profiling

Are you sure?
https://docs.kernel.org/gpu/panfrost.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it seems like two identical file paths, except driver names.

Only thing that might've changed is the value that you should write inside that file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not working with my rk3588 at least.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo 3 | sudo tee /sys/class/drm/renderD*/device/profiling

works

README.md Outdated
- GPU usage and memory usage shows usage of current process, not total system usage (it's an issue on intel's side)
- Integrated Intel GPUs are **limited** due to lack of hwmon interface (it's an issue on intel's side, [i915 source](https://github.com/torvalds/linux/blob/5fc31936081919a8572a3d644f3fbb258038f337/drivers/gpu/drm/i915/i915_hwmon.c#L914-L916), [xe source](https://github.com/torvalds/linux/blob/5fc31936081919a8572a3d644f3fbb258038f337/drivers/gpu/drm/xe/xe_hwmon.c#L824-L826))

#### Panfrost notes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just write this:

#### 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.

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.

3 participants