Re: [PATCH 2/2] drm/amdgpu: Add show_fdinfo() interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Am 20.04.21 um 13:51 schrieb Roy Sun:
[SNIP]
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index 848e175e99ff..72727117c479 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -150,6 +150,7 @@ struct amdgpu_vm_bo_base {
  	/* protected by spinlock */
  	struct list_head		vm_status;
+ struct list_head bo_head;

Well I'm repeating myself. This is a no-go.

You already have the same information in the VM state machine, see function amdgpu_debugfs_vm_bo_info().

Christian.

  	/* protected by the BO being reserved */
  	bool				moved;
  };
@@ -274,6 +275,7 @@ struct amdgpu_vm {
  	struct list_head	invalidated;
  	spinlock_t		invalidated_lock;
+ struct list_head bo_list;
  	/* BO mappings freed, but not yet updated in the PT */
  	struct list_head	freed;
@@ -458,6 +460,8 @@ void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev,
  				struct amdgpu_vm *vm);
  void amdgpu_vm_del_from_lru_notify(struct ttm_buffer_object *bo);
+void amdgpu_vm_get_memory(struct amdgpu_vm *vm, uint64_t *vram_mem,
+				uint64_t *gtt_mem);
  #if defined(CONFIG_DEBUG_FS)
  void amdgpu_debugfs_vm_bo_info(struct amdgpu_vm *vm, struct seq_file *m);
  #endif

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux