diff options
author | Rob Clark <robdclark@chromium.org> | 2023-05-24 17:59:32 +0200 |
---|---|---|
committer | Neil Armstrong <neil.armstrong@linaro.org> | 2023-05-24 18:03:26 +0200 |
commit | 3f09a0cd4ea3b9d34495450d686227d48e7ec648 (patch) | |
tree | 45389fd7554d84e0b2a769f1cb1cc9564286c23e /include/drm/drm_file.h | |
parent | drm/docs: Fix usage stats typos (diff) | |
download | linux-3f09a0cd4ea3b9d34495450d686227d48e7ec648.tar.xz linux-3f09a0cd4ea3b9d34495450d686227d48e7ec648.zip |
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.h | 4 |
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); |