drm: debugfs: provide infrastructure to dump a DRM GPU VA space
authorDanilo Krummrich <dakr@redhat.com>
Thu, 20 Jul 2023 00:14:23 +0000 (02:14 +0200)
committerDanilo Krummrich <dakr@redhat.com>
Thu, 20 Jul 2023 03:16:21 +0000 (05:16 +0200)
commit4f66feeab173bd73e71028b8c2e1dcea07e32dd5
tree78c8f41fb1cb5d46932479afd2033818c626b752
parente6303f323b1ad9c02ae813fc3dedeaa9dadfd3b0
drm: debugfs: provide infrastructure to dump a DRM GPU VA space

This commit adds a function to dump a DRM GPU VA space and a macro for
drivers to register the struct drm_info_list 'gpuvas' entry.

Most likely, most drivers might maintain one DRM GPU VA space per struct
drm_file, but there might also be drivers not having a fixed relation
between DRM GPU VA spaces and a DRM core infrastructure, hence we need the
indirection via the driver iterating it's maintained DRM GPU VA spaces.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230720001443.2380-3-dakr@redhat.com
drivers/gpu/drm/drm_debugfs.c
include/drm/drm_debugfs.h