dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy}
@ 2016-08-08  3:28 Michel Dänzer
  2016-08-08  3:28 ` [PATCH 1/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm Michel Dänzer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michel Dänzer @ 2016-08-08  3:28 UTC (permalink / raw)
  To: dri-devel

From: Michel Dänzer <michel.daenzer@amd.com>

I noticed that these parameters are unused.

These patches apply on top of 34b58355ad1d ("drm/ttm: Wait for a BO to
become idle before unbinding it from GTT"), which is being merged to 4.8
via Alex's tree.

Michel Dänzer (2):
  drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm
  drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy

 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +++----
 drivers/gpu/drm/nouveau/nouveau_bo.c    | 6 +++---
 drivers/gpu/drm/qxl/qxl_ttm.c           | 4 ++--
 drivers/gpu/drm/radeon/radeon_ttm.c     | 7 +++----
 drivers/gpu/drm/ttm/ttm_bo.c            | 6 ++----
 drivers/gpu/drm/ttm/ttm_bo_util.c       | 7 +++----
 include/drm/ttm/ttm_bo_driver.h         | 7 ++-----
 7 files changed, 18 insertions(+), 26 deletions(-)

-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm
  2016-08-08  3:28 [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy} Michel Dänzer
@ 2016-08-08  3:28 ` Michel Dänzer
  2016-08-08  3:28 ` [PATCH 2/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy Michel Dänzer
  2016-08-08  9:08 ` [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy} Christian König
  2 siblings, 0 replies; 5+ messages in thread
From: Michel Dänzer @ 2016-08-08  3:28 UTC (permalink / raw)
  To: dri-devel

From: Michel Dänzer <michel.daenzer@amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++--
 drivers/gpu/drm/nouveau/nouveau_bo.c    | 4 ++--
 drivers/gpu/drm/radeon/radeon_ttm.c     | 4 ++--
 drivers/gpu/drm/ttm/ttm_bo.c            | 3 +--
 drivers/gpu/drm/ttm/ttm_bo_util.c       | 4 ++--
 include/drm/ttm/ttm_bo_driver.h         | 3 +--
 6 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 9b61c8b..b55310e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -335,7 +335,7 @@ static int amdgpu_move_vram_ram(struct ttm_buffer_object *bo,
 	if (unlikely(r)) {
 		goto out_cleanup;
 	}
-	r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
+	r = ttm_bo_move_ttm(bo, interruptible, no_wait_gpu, new_mem);
 out_cleanup:
 	ttm_bo_mem_put(bo, &tmp_mem);
 	return r;
@@ -368,7 +368,7 @@ static int amdgpu_move_ram_vram(struct ttm_buffer_object *bo,
 	if (unlikely(r)) {
 		return r;
 	}
-	r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
+	r = ttm_bo_move_ttm(bo, interruptible, no_wait_gpu, &tmp_mem);
 	if (unlikely(r)) {
 		goto out_cleanup;
 	}
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 6190035..01460d7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1151,7 +1151,7 @@ nouveau_bo_move_flipd(struct ttm_buffer_object *bo, bool evict, bool intr,
 	if (ret)
 		goto out;
 
-	ret = ttm_bo_move_ttm(bo, true, intr, no_wait_gpu, new_mem);
+	ret = ttm_bo_move_ttm(bo, intr, no_wait_gpu, new_mem);
 out:
 	ttm_bo_mem_put(bo, &tmp_mem);
 	return ret;
@@ -1179,7 +1179,7 @@ nouveau_bo_move_flips(struct ttm_buffer_object *bo, bool evict, bool intr,
 	if (ret)
 		return ret;
 
-	ret = ttm_bo_move_ttm(bo, true, intr, no_wait_gpu, &tmp_mem);
+	ret = ttm_bo_move_ttm(bo, intr, no_wait_gpu, &tmp_mem);
 	if (ret)
 		goto out;
 
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 557ef0c..dd06047 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -346,7 +346,7 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo,
 	if (unlikely(r)) {
 		goto out_cleanup;
 	}
-	r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, new_mem);
+	r = ttm_bo_move_ttm(bo, interruptible, no_wait_gpu, new_mem);
 out_cleanup:
 	ttm_bo_mem_put(bo, &tmp_mem);
 	return r;
@@ -379,7 +379,7 @@ static int radeon_move_ram_vram(struct ttm_buffer_object *bo,
 	if (unlikely(r)) {
 		return r;
 	}
-	r = ttm_bo_move_ttm(bo, true, interruptible, no_wait_gpu, &tmp_mem);
+	r = ttm_bo_move_ttm(bo, interruptible, no_wait_gpu, &tmp_mem);
 	if (unlikely(r)) {
 		goto out_cleanup;
 	}
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index f078038..2016c08 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -355,8 +355,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
 
 	if (!(old_man->flags & TTM_MEMTYPE_FLAG_FIXED) &&
 	    !(new_man->flags & TTM_MEMTYPE_FLAG_FIXED))
-		ret = ttm_bo_move_ttm(bo, evict, interruptible, no_wait_gpu,
-				      mem);
+		ret = ttm_bo_move_ttm(bo, interruptible, no_wait_gpu, mem);
 	else if (bdev->driver->move)
 		ret = bdev->driver->move(bo, evict, interruptible,
 					 no_wait_gpu, mem);
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index f157a9e..f87162f 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -45,8 +45,8 @@ void ttm_bo_free_old_node(struct ttm_buffer_object *bo)
 }
 
 int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
-		    bool evict, bool interruptible,
-		    bool no_wait_gpu, struct ttm_mem_reg *new_mem)
+		    bool interruptible, bool no_wait_gpu,
+		    struct ttm_mem_reg *new_mem)
 {
 	struct ttm_tt *ttm = bo->ttm;
 	struct ttm_mem_reg *old_mem = &bo->mem;
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 99c6d01..12d348f 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -961,7 +961,6 @@ void ttm_mem_io_free(struct ttm_bo_device *bdev,
  * ttm_bo_move_ttm
  *
  * @bo: A pointer to a struct ttm_buffer_object.
- * @evict: 1: This is an eviction. Don't try to pipeline.
  * @interruptible: Sleep interruptible if waiting.
  * @no_wait_gpu: Return immediately if the GPU is busy.
  * @new_mem: struct ttm_mem_reg indicating where to move.
@@ -977,7 +976,7 @@ void ttm_mem_io_free(struct ttm_bo_device *bdev,
  */
 
 extern int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
-			   bool evict, bool interruptible, bool no_wait_gpu,
+			   bool interruptible, bool no_wait_gpu,
 			   struct ttm_mem_reg *new_mem);
 
 /**
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy
  2016-08-08  3:28 [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy} Michel Dänzer
  2016-08-08  3:28 ` [PATCH 1/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm Michel Dänzer
@ 2016-08-08  3:28 ` Michel Dänzer
  2016-08-08  9:08 ` [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy} Christian König
  2 siblings, 0 replies; 5+ messages in thread
From: Michel Dänzer @ 2016-08-08  3:28 UTC (permalink / raw)
  To: dri-devel

From: Michel Dänzer <michel.daenzer@amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +--
 drivers/gpu/drm/nouveau/nouveau_bo.c    | 2 +-
 drivers/gpu/drm/qxl/qxl_ttm.c           | 4 ++--
 drivers/gpu/drm/radeon/radeon_ttm.c     | 3 +--
 drivers/gpu/drm/ttm/ttm_bo.c            | 3 +--
 drivers/gpu/drm/ttm/ttm_bo_util.c       | 3 +--
 include/drm/ttm/ttm_bo_driver.h         | 4 +---
 7 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index b55310e..566c6dc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -435,8 +435,7 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo,
 
 	if (r) {
 memcpy:
-		r = ttm_bo_move_memcpy(bo, evict, interruptible,
-				       no_wait_gpu, new_mem);
+		r = ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu, new_mem);
 		if (r) {
 			return r;
 		}
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 01460d7..8ab9ce5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1297,7 +1297,7 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict, bool intr,
 	/* Fallback to software copy. */
 	ret = ttm_bo_wait(bo, intr, no_wait_gpu);
 	if (ret == 0)
-		ret = ttm_bo_move_memcpy(bo, evict, intr, no_wait_gpu, new_mem);
+		ret = ttm_bo_move_memcpy(bo, intr, no_wait_gpu, new_mem);
 
 out:
 	if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index d50c967..6a22de0 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -361,8 +361,8 @@ static int qxl_bo_move(struct ttm_buffer_object *bo,
 		qxl_move_null(bo, new_mem);
 		return 0;
 	}
-	return ttm_bo_move_memcpy(bo, evict, interruptible,
-				  no_wait_gpu, new_mem);
+	return ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu,
+				  new_mem);
 }
 
 static void qxl_bo_move_notify(struct ttm_buffer_object *bo,
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index dd06047..bb4c02b 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -444,8 +444,7 @@ static int radeon_bo_move(struct ttm_buffer_object *bo,
 
 	if (r) {
 memcpy:
-		r = ttm_bo_move_memcpy(bo, evict, interruptible,
-				       no_wait_gpu, new_mem);
+		r = ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu, new_mem);
 		if (r) {
 			return r;
 		}
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 2016c08..f16fa4e 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -360,8 +360,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
 		ret = bdev->driver->move(bo, evict, interruptible,
 					 no_wait_gpu, mem);
 	else
-		ret = ttm_bo_move_memcpy(bo, evict, interruptible,
-					 no_wait_gpu, mem);
+		ret = ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu, mem);
 
 	if (ret) {
 		if (bdev->driver->move_notify) {
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index f87162f..bf6e216 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -329,8 +329,7 @@ static int ttm_copy_ttm_io_page(struct ttm_tt *ttm, void *dst,
 }
 
 int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
-		       bool evict, bool interruptible,
-		       bool no_wait_gpu,
+		       bool interruptible, bool no_wait_gpu,
 		       struct ttm_mem_reg *new_mem)
 {
 	struct ttm_bo_device *bdev = bo->bdev;
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 12d348f..c986fa7 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -983,7 +983,6 @@ extern int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
  * ttm_bo_move_memcpy
  *
  * @bo: A pointer to a struct ttm_buffer_object.
- * @evict: 1: This is an eviction. Don't try to pipeline.
  * @interruptible: Sleep interruptible if waiting.
  * @no_wait_gpu: Return immediately if the GPU is busy.
  * @new_mem: struct ttm_mem_reg indicating where to move.
@@ -999,8 +998,7 @@ extern int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
  */
 
 extern int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
-			      bool evict, bool interruptible,
-			      bool no_wait_gpu,
+			      bool interruptible, bool no_wait_gpu,
 			      struct ttm_mem_reg *new_mem);
 
 /**
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy}
  2016-08-08  3:28 [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy} Michel Dänzer
  2016-08-08  3:28 ` [PATCH 1/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm Michel Dänzer
  2016-08-08  3:28 ` [PATCH 2/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy Michel Dänzer
@ 2016-08-08  9:08 ` Christian König
  2016-08-08 15:18   ` Alex Deucher
  2 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2016-08-08  9:08 UTC (permalink / raw)
  To: Michel Dänzer, dri-devel

Am 08.08.2016 um 05:28 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

>
> I noticed that these parameters are unused.
>
> These patches apply on top of 34b58355ad1d ("drm/ttm: Wait for a BO to
> become idle before unbinding it from GTT"), which is being merged to 4.8
> via Alex's tree.
>
> Michel Dänzer (2):
>    drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm
>    drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy
>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +++----
>   drivers/gpu/drm/nouveau/nouveau_bo.c    | 6 +++---
>   drivers/gpu/drm/qxl/qxl_ttm.c           | 4 ++--
>   drivers/gpu/drm/radeon/radeon_ttm.c     | 7 +++----
>   drivers/gpu/drm/ttm/ttm_bo.c            | 6 ++----
>   drivers/gpu/drm/ttm/ttm_bo_util.c       | 7 +++----
>   include/drm/ttm/ttm_bo_driver.h         | 7 ++-----
>   7 files changed, 18 insertions(+), 26 deletions(-)
>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy}
  2016-08-08  9:08 ` [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy} Christian König
@ 2016-08-08 15:18   ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2016-08-08 15:18 UTC (permalink / raw)
  To: Christian König; +Cc: Michel Dänzer, Maling list - DRI developers

On Mon, Aug 8, 2016 at 5:08 AM, Christian König <deathsimple@vodafone.de> wrote:
> Am 08.08.2016 um 05:28 schrieb Michel Dänzer:
>>
>> From: Michel Dänzer <michel.daenzer@amd.com>
>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>

Applied.  thanks!

Alex

>
>>
>> I noticed that these parameters are unused.
>>
>> These patches apply on top of 34b58355ad1d ("drm/ttm: Wait for a BO to
>> become idle before unbinding it from GTT"), which is being merged to 4.8
>> via Alex's tree.
>>
>> Michel Dänzer (2):
>>    drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm
>>    drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy
>>
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +++----
>>   drivers/gpu/drm/nouveau/nouveau_bo.c    | 6 +++---
>>   drivers/gpu/drm/qxl/qxl_ttm.c           | 4 ++--
>>   drivers/gpu/drm/radeon/radeon_ttm.c     | 7 +++----
>>   drivers/gpu/drm/ttm/ttm_bo.c            | 6 ++----
>>   drivers/gpu/drm/ttm/ttm_bo_util.c       | 7 +++----
>>   include/drm/ttm/ttm_bo_driver.h         | 7 ++-----
>>   7 files changed, 18 insertions(+), 26 deletions(-)
>>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-08 15:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-08  3:28 [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy} Michel Dänzer
2016-08-08  3:28 ` [PATCH 1/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_ttm Michel Dänzer
2016-08-08  3:28 ` [PATCH 2/2] drm/ttm: Remove unused parameter evict from ttm_bo_move_memcpy Michel Dänzer
2016-08-08  9:08 ` [PATCH 0/2] Remove unused parameter evict from ttm_bo_move_{ttm, memcpy} Christian König
2016-08-08 15:18   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).