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

Christian König christian.koenig at amd.com
Tue Jan 25 10:36:34 UTC 2022


Wow, nice.

Certainly +1 from my side to have that generalized, documented and 
uniform among all drivers.

Regards,
Christian.

Am 25.01.22 um 11:24 schrieb Tvrtko Ursulin:
>
> 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fpatch%2F468491%2F%3Fseries%3D98555%26rev%3D1&data=04%7C01%7Cchristian.koenig%40amd.com%7C99e7138493364003d3e908d9dfece57f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637787030821307243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=X5Qa7rZkyvplRJ5fJwaKjwa%2FtII9EZmg5PIYMOcqKiA%3D&reserved=0). 
>> 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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcgit.freedesktop.org%2F~tursulin%2Fintel-gpu-tools%2Flog%2F%3Fh%3Dgputop&data=04%7C01%7Cchristian.koenig%40amd.com%7C99e7138493364003d3e908d9dfece57f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637787030821307243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=FBhSRN8vyl6zgT8vGZ8kRhWFtt59dZUCHMmeCl9gdnI%3D&reserved=0 
>
>
> If you manage to export the right fdinfo tags (basically 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.freedesktop.org%2Fpatch%2F468502%2F%3Fseries%3D92574%26rev%3D6&data=04%7C01%7Cchristian.koenig%40amd.com%7C99e7138493364003d3e908d9dfece57f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637787030821307243%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=a0aBjo%2B2WyfzSfrjWkHteEuZAmncLbO8Z%2F5ypZKumlU%3D&reserved=0)*, 
> 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