drm/nouveau: add some basic debugfs dumping for nouveau's clients and vm mappings
Subsystems (3)
PATCH 1/1 drm/nouveau: add some basic debugfs dumping for nouveau's clients and vm mappings
This adds some basic debug information about the internal nouveau state. making it slightly easier to determine which bo belongs to which vm address, as long as that program is still running.
Signed-off-by Maarten Lankhorst <[email protected]>
---
drivers/gpu/drm/nouveau/core/include/subdev/vm.h +6 -0
@@ -50,6 +50,12 @@ struct nouveau_vma {struct nouveau_mm_node *node;u64 offset;u32 access; +enum nouveau_vma_mapping { +NOUVEAU_MAP_UNMAPPED , +NOUVEAU_MAP_SG , +NOUVEAU_MAP_GART , +NOUVEAU_MAP_VRAM + } mapping; };struct nouveau_vm {
drivers/gpu/drm/nouveau/core/subdev/vm/base.c +5 -0
@@ -70,6 +70,7 @@ nouveau_vm_map_at(struct nouveau_vma *vma, u64 delta, struct nouveau_mem *node) } vmm->flush (vm); + vma->mapping =NOUVEAU_MAP_VRAM ; } static void
@@ -128,6 +129,7 @@ nouveau_vm_map_sg_table(struct nouveau_vma *vma, u64 delta, u64 length, } finish: vmm->flush (vm); + vma->mapping =NOUVEAU_MAP_SG ; } static void
@@ -166,6 +168,7 @@ nouveau_vm_map_sg(struct nouveau_vma *vma, u64 delta, u64 length, } vmm->flush (vm); + vma->mapping =NOUVEAU_MAP_GART ; }void
@@ -213,6 +216,7 @@ nouveau_vm_unmap_at(struct nouveau_vma *vma, u64 delta, u64 length) } vmm->flush (vm); + vma->mapping =NOUVEAU_MAP_UNMAPPED ; }void
@@ -330,6 +334,7 @@ nouveau_vm_get(struct nouveau_vm *vm, u64 size, u32 page_shift,nouveau_vm_ref (vm, &vma->vm,NULL ); vma->offset = (u64 )vma->node->offset <<12 ; vma->access = access; + vma->mapping =NOUVEAU_MAP_UNMAPPED ;return 0 ; }
drivers/gpu/drm/nouveau/nouveau_abi16.c +2 -0
@@ -47,6 +47,8 @@ nouveau_abi16_get(struct drm_file *file_priv, struct drm_device *dev)struct nouveau_abi16 *abi16; cli->abi16 = abi16 =kzalloc (sizeof (*abi16),GFP_KERNEL );if (cli->abi16) { + abi16->file = file_priv; +INIT_LIST_HEAD (&abi16->channels); abi16->client =nv_object (cli);
drivers/gpu/drm/nouveau/nouveau_abi16.h +1 -0
@@ -31,6 +31,7 @@ struct nouveau_abi16 {struct nouveau_object *client;struct nouveau_object *device;struct list_head channels; +struct drm_file *file;u64 handles; };
drivers/gpu/drm/nouveau/nouveau_debugfs.c +204 -0
217 lines not on this page · raw message