Skip to contentSkip to conversation

drm/ttm: Doc the unit of ttm_resource_manager.usage

PATCH In review Nirmoy Das 2 participants 2 messages May 9, 2023 – May 10, 2023

Subsystems (2)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 drm/ttm: Doc the unit of ttm_resource_manager.usage

Document the unit of ttm_resource_manager.usage which was missing before.

Cc Thomas Hellström <[email protected]>
Cc Christian König <[email protected]>
Cc Anshuman Gupta <[email protected]>
---
 include/drm/ttm/ttm_resource.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/drm/ttm/ttm_resource.h +2 -2
index 78a226eba953..32d6b9c91c40 100644
@@ -145,6 +145,7 @@ struct ttm_resource_manager_func {
  * @move_lock: lock for move fence
  * @move: The fence of the last pipelined move operation.
  * @lru: The lru list for this memory type.
+ * @usage: How much of the resources are used, in bytes.
  *
  * This structure is used to identify and manage memory types for a device.
  */
@@ -170,8 +171,7 @@ struct ttm_resource_manager {
 	struct list_head lru[TTM_MAX_BO_PRIORITY];
 
 	/**
-	 * @usage: How much of the resources are used, protected by the
-	 * bdev->lru_lock.
+	 * Protected by the bdev->lru_lock.
 	 */
 	uint64_t usage;
 };
Signature · 1 line
2.39.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Nirmoy,

Quoted 17 lines · Nirmoy Das

Document the unit of ttm_resource_manager.usage which was missing before.

Cc Thomas Hellström <[email protected]>
Cc Christian König <[email protected]>
Cc Anshuman Gupta <[email protected]>
---
  include/drm/ttm/ttm_resource.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
include/drm/ttm/ttm_resource.h +0 -0
index 78a226eba953..32d6b9c91c40 100644

include/drm/ttm/ttm_resource.h struct ttm_resource_manager_func { · line 148

Quoted 4 lines
include/drm/ttm/ttm_resource.h +1 -0
@@ -145,6 +145,7 @@ struct ttm_resource_manager_func {
   * @move_lock: lock for move fence
   * @move: The fence of the last pipelined move operation.
   * @lru: The lru list for this memory type.
+ * @usage: How much of the resources are used, in bytes.

That's a very helpful addition, thanks for the patch:

Quoted 13 lines
include/drm/ttm/ttm_resource.h +1 -2
   *
   * This structure is used to identify and manage memory types for a device.
   */
@@ -170,8 +171,7 @@ struct ttm_resource_manager {
  	struct list_head lru[TTM_MAX_BO_PRIORITY];
 
  	/**
-	 * @usage: How much of the resources are used, protected by the
-	 * bdev->lru_lock.
+	 * Protected by the bdev->lru_lock.
  	 */
  	uint64_t usage;
  };