summaryrefslogtreecommitdiff
path: root/include/drm/drm_drv.h
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2023-05-24 08:59:32 -0700
committerNeil Armstrong <neil.armstrong@linaro.org>2023-05-24 18:03:26 +0200
commit3f09a0cd4ea3b9d34495450d686227d48e7ec648 (patch)
tree45389fd7554d84e0b2a769f1cb1cc9564286c23e /include/drm/drm_drv.h
parent0020582a8afe9a8570f80ec503c59bf049a616de (diff)
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 'include/drm/drm_drv.h')
-rw-r--r--include/drm/drm_drv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index b419c59c4bef..89e2706cac56 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -401,6 +401,13 @@ struct drm_driver {
struct drm_device *dev, uint32_t handle,
uint64_t *offset);
+ /**
+ * @show_fdinfo:
+ *
+ * Print device specific fdinfo. See Documentation/gpu/drm-usage-stats.rst.
+ */
+ void (*show_fdinfo)(struct drm_printer *p, struct drm_file *f);
+
/** @major: driver major number */
int major;
/** @minor: driver minor number */