[Intel-gfx] [PATCH 6/7] drm: Document fdinfo format specification

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Jan 25 10:24:35 UTC 2022


On 21/01/2022 11:50, Tvrtko Ursulin wrote:
> On 20/01/2022 16:44, Rob Clark wrote:

[snip]

>> If there is a tool somewhere that displays this info, that would be
>> useful for testing my implementation.
> 
> I have a patch to Intel specific intel_gpu_top (see 
> https://patchwork.freedesktop.org/patch/468491/?series=98555&rev=1). 
> I'll have a look to see how much work would it be to extract common bits 
> into a library and write a quick agnostic tool using it.

I factored out some code from intel_gpu_top in a quick and dirty attempt to make it generic and made a very rudimentary tools/gputop:

https://cgit.freedesktop.org/~tursulin/intel-gpu-tools/log/?h=gputop
  
If you manage to export the right fdinfo tags (basically https://patchwork.freedesktop.org/patch/468502/?series=92574&rev=6)*, with the only local addition I have being the optional "drm-engine-capacity-<str>: <uint>" tag, we may get lucky and tool might even work. Let me know when you try. If it will work you should see something like this:

DRM minor 0
    PID              NAME    render       copy       video
   3838          kwin_x11 |█         ||          ||          ||          |
327056               mpv |          ||          ||▌         ||          |
327056               mpv |▌         ||          ||          ||          |
      1           systemd |▍         ||          ||          ||          |
   3884       plasmashell |          ||          ||          ||          |
   4794           krunner |          ||          ||          ||          |
   4836       thunderbird |          ||          ||          ||          |
296733         GeckoMain |          ||          ||          ||          |

Regards,

Tvrtko

*) Or for more reference this is how the i915 output looks like:

$ sudo cat /proc/7296/fdinfo/10
pos:    0
flags:  02100002
mnt_id: 26
ino:    501
drm-driver:     i915
drm-pdev:       0000:00:02.0
drm-client-id:  22
drm-engine-render:      196329331 ns
drm-engine-copy:        0 ns
drm-engine-video:       0 ns
drm-engine-capacity-video:      2
drm-engine-video-enhance:       0 ns

P.S. There is no AMD support in the current code, or nothing for memory either. Both can be added later.


More information about the Intel-gfx mailing list