All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 3/5] drm/amdgpu: remove extra parameter from amdgpu_ttm_bind()
Date: Fri, 20 Oct 2017 11:20:34 +0200	[thread overview]
Message-ID: <20171020092036.11145-3-deathsimple@vodafone.de> (raw)
In-Reply-To: <20171020092036.11145-1-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>

From: Christian König <christian.koenig@amd.com>

We always use the BO mem now.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c     | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c    | 6 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h    | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index f7fceb63413c..9f0a462bf70f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -675,7 +675,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
 	if (!r && p->uf_entry.robj) {
 		struct amdgpu_bo *uf = p->uf_entry.robj;
 
-		r = amdgpu_ttm_bind(&uf->tbo, &uf->tbo.mem);
+		r = amdgpu_ttm_bind(&uf->tbo);
 		p->job->uf_addr += amdgpu_bo_gpu_offset(uf);
 	}
 
@@ -1591,5 +1591,5 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,
 			return r;
 	}
 
-	return amdgpu_ttm_bind(&(*bo)->tbo, &(*bo)->tbo.mem);
+	return amdgpu_ttm_bind(&(*bo)->tbo);
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 71a0c1a477ae..aecc62b158d9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -690,7 +690,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
 
 	bo->pin_count = 1;
 	if (gpu_addr != NULL) {
-		r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem);
+		r = amdgpu_ttm_bind(&bo->tbo);
 		if (unlikely(r)) {
 			dev_err(adev->dev, "%p bind failed\n", bo);
 			goto error;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 1c9faa1a53ce..a0944a150d9a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -884,7 +884,7 @@ static int amdgpu_ttm_backend_bind(struct ttm_tt *ttm,
 	return r;
 }
 
-int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem)
+int amdgpu_ttm_bind(struct ttm_buffer_object *bo)
 {
 	struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
 	struct ttm_tt *ttm = bo->ttm;
@@ -894,7 +894,7 @@ int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem)
 	struct ttm_place placements;
 	int r;
 
-	if (!ttm || amdgpu_gtt_mgr_is_allocated(bo_mem))
+	if (!ttm || amdgpu_gtt_mgr_is_allocated(&bo->mem))
 		return 0;
 
 	tmp = bo->mem;
@@ -1627,7 +1627,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,
 	}
 
 	if (bo->tbo.mem.mem_type == TTM_PL_TT) {
-		r = amdgpu_ttm_bind(&bo->tbo, &bo->tbo.mem);
+		r = amdgpu_ttm_bind(&bo->tbo);
 		if (r)
 			return r;
 	}
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
index 89a71abc71e0..39140ed88273 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
@@ -90,7 +90,7 @@ int amdgpu_fill_buffer(struct amdgpu_bo *bo,
 			struct dma_fence **fence);
 
 int amdgpu_mmap(struct file *filp, struct vm_area_struct *vma);
-int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem);
+int amdgpu_ttm_bind(struct ttm_buffer_object *bo);
 int amdgpu_ttm_recover_gart(struct amdgpu_device *adev);
 
 int amdgpu_ttm_tt_get_user_pages(struct ttm_tt *ttm, struct page **pages);
-- 
2.11.0

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

  parent reply	other threads:[~2017-10-20  9:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20  9:20 [PATCH 1/5] drm/amdgpu: minor cleanup for amdgpu_ttm_bind Christian König
     [not found] ` <20171020092036.11145-1-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-10-20  9:20   ` [PATCH 2/5] drm/amdgpu: nuke amdgpu_ttm_is_bound() Christian König
     [not found]     ` <20171020092036.11145-2-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-10-23  7:33       ` Chunming Zhou
     [not found]         ` <0f8c52bb-fefa-319a-2926-e30a403d0867-5C7GfCeVMHo@public.gmane.org>
2017-10-23  8:11           ` Christian König
     [not found]             ` <09bdc92d-f3bd-6b07-85fc-8943220248cc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-23  8:34               ` Chunming Zhou
     [not found]                 ` <d404cdc7-9b5a-297f-1d21-25bb1b037ac1-5C7GfCeVMHo@public.gmane.org>
2017-10-23 14:26                   ` Christian König
     [not found]                     ` <f763be73-ed30-e278-d951-3ff2d88735c5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-24  1:41                       ` Chunming Zhou
     [not found]                         ` <8203a931-2c05-cd50-2788-ab10e70382de-5C7GfCeVMHo@public.gmane.org>
2017-10-24  6:51                           ` Christian König
2017-10-20  9:20   ` Christian König [this message]
2017-10-20  9:20   ` [PATCH 4/5] drm/amdgpu: move GART recovery into GTT manager Christian König
2017-10-20  9:20   ` [PATCH 5/5] drm/amdgpu: don't flush the TLB before initializing GART Christian König
2017-10-20  9:28   ` [PATCH 1/5] drm/amdgpu: minor cleanup for amdgpu_ttm_bind Michel Dänzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171020092036.11145-3-deathsimple@vodafone.de \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.