Skip to contentSkip to conversation

drm/ttm: fix the warning for hit_low and evict_low

PATCH In review Sunil Khatri 3 participants 4 messages Apr 21, 2025 – Apr 23, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ttm: fix the warning for hit_low and evict_low

fix the below warning messages:
ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'hit_low' not described in 'ttm_bo_swapout_walk' ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'evict_low' not described in 'ttm_bo_swapout_walk'

Cc Maarten Lankhorst <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
---
 drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo.c +2 -1
index 95b86003c50d..5bf3c969907c 100644
@@ -1093,7 +1093,8 @@ struct ttm_bo_swapout_walk {
 	struct ttm_lru_walk walk;
 	/** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
 	gfp_t gfp_flags;
-
+	/** @hit_low: Whether we should attempt to swap BO's with low watermark threshold */
+	/** @evict_low: If we cannot swap a bo when @try_low is false (first pass) */
 	bool hit_low, evict_low;
 };
 
Signature · 1 line
2.34.1
#1 lore raw

@Lankhorst
Does the comment sounds correct or could you please share what should be the right comment to add

Regards
Sunil Khatri

Quoted 25 lines · Sunil Khatri

fix the below warning messages:
ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'hit_low' not described in 'ttm_bo_swapout_walk' ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'evict_low' not described in 'ttm_bo_swapout_walk'

Cc Maarten Lankhorst <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
---
  drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo.c +2 -1
index 95b86003c50d..5bf3c969907c 100644
@@ -1093,7 +1093,8 @@ struct ttm_bo_swapout_walk {
  	struct ttm_lru_walk walk;
  	/** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
  	gfp_t gfp_flags;
-
+	/** @hit_low: Whether we should attempt to swap BO's with low watermark threshold */
+	/** @evict_low: If we cannot swap a bo when @try_low is false (first pass) */
  	bool hit_low, evict_low;
  };
 
Reviewed-by
#2 lore raw

Hey,
This looks good.

Quoted 32 lines · Sunil

@Lankhorst
Does the comment sounds correct or could you please share what should be the right comment to add

Regards
Sunil Khatri

Quoted 25 lines · Sunil Khatri

fix the below warning messages:
ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'hit_low' not described in 'ttm_bo_swapout_walk' ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'evict_low' not described in 'ttm_bo_swapout_walk'

Cc Maarten Lankhorst <[email protected]>
Cc Tvrtko Ursulin <[email protected]>

---
  drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-

  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo.c +2 -1
index 95b86003c50d..5bf3c969907c 100644
@@ -1093,7 +1093,8 @@ struct ttm_bo_swapout_walk {
       struct ttm_lru_walk walk;
       /** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
       gfp_t gfp_flags;
-
+    /** @hit_low: Whether we should attempt to swap BO's with low watermark threshold */
+    /** @evict_low: If we cannot swap a bo when @try_low is false (first pass) */
       bool hit_low, evict_low;
   };

author Reviewed-by Maarten Lankhorst
#3 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Thanks a lot.

Regards
Sunil Khatri

-----Original Message-----
From: Maarten Lankhorst <[email protected]>
Sent: Tuesday, April 22, 2025 10:24 PM
To: Khatri, Sunil <[email protected]>; Khatri, Sunil <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Tvrtko Ursulin <[email protected]>
Subject: Re: [PATCH] drm/ttm: fix the warning for hit_low and evict_low

Hey,
This looks good.

Quoted 36 lines · Sunil

@Lankhorst
Does the comment sounds correct or could you please share what should be the right comment to add

Regards
Sunil Khatri

Quoted 28 lines · Sunil Khatri

fix the below warning messages:
ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'hit_low' not described in 'ttm_bo_swapout_walk' ttm/ttm_bo.c:1098: warning: Function parameter or struct member 'evict_low' not described in 'ttm_bo_swapout_walk'

Cc Maarten Lankhorst <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
---
  drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/ttm/ttm_bo.c index 95b86003c50d..5bf3c969907c 100644

drivers/gpu/drm/ttm/ttm_bo.c +4 -1
@@ -1093,7 +1093,8 @@ struct ttm_bo_swapout_walk {
      struct ttm_lru_walk walk;
      /** @gfp_flags: The gfp flags to use for ttm_tt_swapout() */
      gfp_t gfp_flags;
-
+    /** @hit_low: Whether we should attempt to swap BO's with low
+watermark threshold */
+    /** @evict_low: If we cannot swap a bo when @try_low is false
+(first pass) */
      bool hit_low, evict_low;
  };