summaryrefslogtreecommitdiff
path: root/include/drm/drm_file.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_file.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_file.h')
-rw-r--r--include/drm/drm_file.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h
index ecffe24e2b1b..7d9b3c65cbc1 100644
--- a/include/drm/drm_file.h
+++ b/include/drm/drm_file.h
@@ -258,6 +258,9 @@ struct drm_file {
/** @pid: Process that opened this file. */
struct pid *pid;
+ /** @client_id: A unique id for fdinfo */
+ u64 client_id;
+
/** @magic: Authentication magic, see @authenticated. */
drm_magic_t magic;
@@ -438,6 +441,7 @@ void drm_send_event(struct drm_device *dev, struct drm_pending_event *e);
void drm_send_event_timestamp_locked(struct drm_device *dev,
struct drm_pending_event *e,
ktime_t timestamp);
+void drm_show_fdinfo(struct seq_file *m, struct file *f);
struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags);