diff options
author | Rob Clark <robdclark@chromium.org> | 2023-05-24 18:59:32 +0300 |
---|---|---|
committer | Neil Armstrong <neil.armstrong@linaro.org> | 2023-05-24 19:03:26 +0300 |
commit | 3f09a0cd4ea3b9d34495450d686227d48e7ec648 (patch) | |
tree | 45389fd7554d84e0b2a769f1cb1cc9564286c23e /Documentation/gpu | |
parent | 0020582a8afe9a8570f80ec503c59bf049a616de (diff) | |
download | linux-3f09a0cd4ea3b9d34495450d686227d48e7ec648.tar.xz |
drm: Add common fdinfo helper
Handle a bit of the boiler-plate in a single case, and make it easier to
add some core tracked stats. This also ensures consistent behavior
across drivers for standardised fields.
v2: Update drm-usage-stats.rst, 64b client-id, rename drm_show_fdinfo
v3: Rebase on drm-misc-next
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230524155956.382440-3-robdclark@gmail.com
Diffstat (limited to 'Documentation/gpu')
-rw-r--r-- | Documentation/gpu/drm-usage-stats.rst | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/gpu/drm-usage-stats.rst b/Documentation/gpu/drm-usage-stats.rst index 72d069e5dacb..552195fb1ea3 100644 --- a/Documentation/gpu/drm-usage-stats.rst +++ b/Documentation/gpu/drm-usage-stats.rst @@ -126,7 +126,15 @@ percentage utilization of the engine, whereas drm-engine-<str> only reflects time active without considering what frequency the engine is operating as a percentage of it's maximum frequency. +Implementation Details +====================== + +Drivers should use drm_show_fdinfo() in their `struct file_operations`, and +implement &drm_driver.show_fdinfo if they wish to provide any stats which +are not provided by drm_show_fdinfo(). But even driver specific stats should +be documented above and where possible, aligned with other drivers. + Driver specific implementations -=============================== +------------------------------- :ref:`i915-usage-stats` |