Skip to contentSkip to conversation

drm/ttm: remove unused paramter

PATCH Superseded Jesse Zhang 3 participants 4 messages Mar 25, 2024 – Mar 29, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ttm: remove unused paramter

remove the unsed the paramter in the function ttm_bo_bounce_temp_buffer and ttm_bo_add_move_fence.

---
 drivers/gpu/drm/ttm/ttm_bo.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +4 -6
index edf10618fe2b..7f08787687a7 100644
@@ -402,7 +402,6 @@ void ttm_bo_put(struct ttm_buffer_object *bo)
 EXPORT_SYMBOL(ttm_bo_put);
 
 static int ttm_bo_bounce_temp_buffer(struct ttm_buffer_object *bo,
-				     struct ttm_resource **mem,
 				     struct ttm_operation_ctx *ctx,
 				     struct ttm_place *hop)
 {
@@ -470,7 +469,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo,
 		if (ret != -EMULTIHOP)
 			break;
 
-		ret = ttm_bo_bounce_temp_buffer(bo, &evict_mem, ctx, &hop);
+		ret = ttm_bo_bounce_temp_buffer(bo, ctx, &hop);
 	} while (!ret);
 
 	if (ret) {
@@ -699,7 +698,6 @@ EXPORT_SYMBOL(ttm_bo_unpin);
  */
 static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
 				 struct ttm_resource_manager *man,
-				 struct ttm_resource *mem,
 				 bool no_wait_gpu)
 {
 	struct dma_fence *fence;
@@ -753,7 +751,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
 			return ret;
 	} while (1);
 
-	return ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu);
+	return ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
 }
 
 /**
@@ -802,7 +800,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
 		if (unlikely(ret))
 			goto error;
 
-		ret = ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu);
+		ret = ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
 		if (unlikely(ret)) {
 			ttm_resource_free(bo, mem);
 			if (ret == -EBUSY)
@@ -866,7 +864,7 @@ static int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
 bounce:
 	ret = ttm_bo_handle_move_mem(bo, mem, false, ctx, &hop);
 	if (ret == -EMULTIHOP) {
-		ret = ttm_bo_bounce_temp_buffer(bo, &mem, ctx, &hop);
+		ret = ttm_bo_bounce_temp_buffer(bo, ctx, &hop);
 		if (ret)
 			goto out;
 		/* try and move to final place now. */
Signature · 1 line
2.25.1
#1 lore raw

✗ Fi.CI.BUILD: failure for drm/ttm: remove unused paramter

== Series Details ==

== Series Details ==

Series: drm/ttm: remove unused paramter
URL : https://patchwork.freedesktop.org/series/131576/
State : failure

== Summary ==

Error: patch https://patchwork.freedesktop.org/api/1.0/series/131576/revisions/1/mbox/ not applied
Applying: drm/ttm: remove unused paramter
Using index info to reconstruct a base tree...
M drivers/gpu/drm/ttm/ttm_bo.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/ttm/ttm_bo.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/ttm/ttm_bo.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/ttm: remove unused paramter
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced

#2 lore raw
In reply to Jesse Zhang

Am 25.03.24 um 08:45 schrieb Jesse Zhang:

Quoted 4 lines

remove the unsed the paramter in the function ttm_bo_bounce_temp_buffer and ttm_bo_add_move_fence.

Good catch, Reviewed-by: Christian König <[email protected]>

Regards,
Christian.

Quoted 60 lines
---
  drivers/gpu/drm/ttm/ttm_bo.c | 10 ++++------
  1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +4 -6
index edf10618fe2b..7f08787687a7 100644
@@ -402,7 +402,6 @@ void ttm_bo_put(struct ttm_buffer_object *bo)
  EXPORT_SYMBOL(ttm_bo_put);
 
  static int ttm_bo_bounce_temp_buffer(struct ttm_buffer_object *bo,
-				     struct ttm_resource **mem,
  				     struct ttm_operation_ctx *ctx,
  				     struct ttm_place *hop)
  {
@@ -470,7 +469,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo,
  		if (ret != -EMULTIHOP)
  			break;
 
-		ret = ttm_bo_bounce_temp_buffer(bo, &evict_mem, ctx, &hop);
+		ret = ttm_bo_bounce_temp_buffer(bo, ctx, &hop);
  	} while (!ret);
 
  	if (ret) {
@@ -699,7 +698,6 @@ EXPORT_SYMBOL(ttm_bo_unpin);
   */
  static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
  				 struct ttm_resource_manager *man,
-				 struct ttm_resource *mem,
  				 bool no_wait_gpu)
  {
  	struct dma_fence *fence;
@@ -753,7 +751,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
  			return ret;
  	} while (1);
 
-	return ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu);
+	return ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
  }
 
  /**
@@ -802,7 +800,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
  		if (unlikely(ret))
  			goto error;
 
-		ret = ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu);
+		ret = ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
  		if (unlikely(ret)) {
  			ttm_resource_free(bo, mem);
  			if (ret == -EBUSY)
@@ -866,7 +864,7 @@ static int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
  bounce:
  	ret = ttm_bo_handle_move_mem(bo, mem, false, ctx, &hop);
  	if (ret == -EMULTIHOP) {
-		ret = ttm_bo_bounce_temp_buffer(bo, &mem, ctx, &hop);
+		ret = ttm_bo_bounce_temp_buffer(bo, ctx, &hop);
  		if (ret)
  			goto out;
  		/* try and move to final place now. */
#3 lore raw

Am 29.03.24 um 12:10 schrieb Christian König:

Quoted 7 lines

Am 25.03.24 um 08:45 schrieb Jesse Zhang:

Quoted 4 lines

remove the unsed the paramter in the function ttm_bo_bounce_temp_buffer and ttm_bo_add_move_fence.

Good catch, Reviewed-by: Christian König <[email protected]>

Please rebase that patch on top of drm-misc-next.

Regards,
Christian.

Quoted 62 lines

Regards,
Christian.

Quoted 57 lines

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

  1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/ttm/ttm_bo.c +3 -2
index edf10618fe2b..7f08787687a7 100644
@@ -402,7 +402,6 @@ void ttm_bo_put(struct ttm_buffer_object *bo)
   EXPORT_SYMBOL(ttm_bo_put);
     static int ttm_bo_bounce_temp_buffer(struct ttm_buffer_object *bo,
-                     struct ttm_resource **mem,
                        struct ttm_operation_ctx *ctx,
                        struct ttm_place *hop)
   {
@@ -470,7 +469,7 @@ static int ttm_bo_evict(struct ttm_buffer_object 
 *bo,
           if (ret != -EMULTIHOP)
               break;
   -        ret = ttm_bo_bounce_temp_buffer(bo, &evict_mem, ctx, &hop);
+        ret = ttm_bo_bounce_temp_buffer(bo, ctx, &hop);
       } while (!ret);
         if (ret) {
@@ -699,7 +698,6 @@ EXPORT_SYMBOL(ttm_bo_unpin);
    */
   static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,
                    struct ttm_resource_manager *man,
-                 struct ttm_resource *mem,
                    bool no_wait_gpu)
   {
       struct dma_fence *fence;
@@ -753,7 +751,7 @@ static int ttm_bo_mem_force_space(struct 
 ttm_buffer_object *bo,
               return ret;
       } while (1);
   -    return ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu);
+    return ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
   }
     /**
@@ -802,7 +800,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
           if (unlikely(ret))
               goto error;
   -        ret = ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu);
+        ret = ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
           if (unlikely(ret)) {
               ttm_resource_free(bo, mem);
               if (ret == -EBUSY)
@@ -866,7 +864,7 @@ static int ttm_bo_move_buffer(struct 
 ttm_buffer_object *bo,

  bounce:
      ret = ttm_bo_handle_move_mem(bo, mem, false, ctx, &hop); if (ret == -EMULTIHOP) {
-        ret = ttm_bo_bounce_temp_buffer(bo, &mem, ctx, &hop); +        ret = ttm_bo_bounce_temp_buffer(bo, ctx, &hop); if (ret)
              goto out;
          /* try and move to final place now. */