Skip to content
Snippets Groups Projects
Commit d73b4ff1 authored by Danilo Krummrich's avatar Danilo Krummrich
Browse files

drm/nouveau: debugfs: implement DRM GPU VA debugfs


Provide the driver indirection iterating over all DRM GPU VA spaces to
enable the common 'gpuvas' debugfs file for dumping DRM GPU VA spaces.

Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
parent 21117371
No related branches found
No related tags found
Loading
...@@ -202,6 +202,29 @@ nouveau_debugfs_pstate_open(struct inode *inode, struct file *file) ...@@ -202,6 +202,29 @@ nouveau_debugfs_pstate_open(struct inode *inode, struct file *file)
return single_open(file, nouveau_debugfs_pstate_get, inode->i_private); return single_open(file, nouveau_debugfs_pstate_get, inode->i_private);
} }
static int
nouveau_debugfs_gpuva(struct seq_file *m, void *data)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
struct nouveau_drm *drm = nouveau_drm(node->minor->dev);
struct nouveau_cli *cli;
mutex_lock(&drm->clients_lock);
list_for_each_entry(cli, &drm->clients, head) {
struct nouveau_uvmm *uvmm = nouveau_cli_uvmm(cli);
if (!uvmm)
continue;
mutex_lock(&uvmm->mutex);
drm_debugfs_gpuva_info(m, &uvmm->umgr);
mutex_unlock(&uvmm->mutex);
}
mutex_unlock(&drm->clients_lock);
return 0;
}
static const struct file_operations nouveau_pstate_fops = { static const struct file_operations nouveau_pstate_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = nouveau_debugfs_pstate_open, .open = nouveau_debugfs_pstate_open,
...@@ -213,6 +236,7 @@ static const struct file_operations nouveau_pstate_fops = { ...@@ -213,6 +236,7 @@ static const struct file_operations nouveau_pstate_fops = {
static struct drm_info_list nouveau_debugfs_list[] = { static struct drm_info_list nouveau_debugfs_list[] = {
{ "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL }, { "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL },
{ "strap_peek", nouveau_debugfs_strap_peek, 0, NULL }, { "strap_peek", nouveau_debugfs_strap_peek, 0, NULL },
DRM_DEBUGFS_GPUVA_INFO(nouveau_debugfs_gpuva, NULL),
}; };
#define NOUVEAU_DEBUGFS_ENTRIES ARRAY_SIZE(nouveau_debugfs_list) #define NOUVEAU_DEBUGFS_ENTRIES ARRAY_SIZE(nouveau_debugfs_list)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment