From: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 3/4] drm/amd/amdgpu: remove usage of ttm trace
Date: Mon, 18 Sep 2017 13:33:49 -0400 [thread overview]
Message-ID: <20170918173350.9543-4-tom.stdenis@amd.com> (raw)
In-Reply-To: <20170918173350.9543-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 36 +++------------------------------
1 file changed, 3 insertions(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 02ae32378e1c..b41d03226c26 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -34,7 +34,6 @@
#include <drm/ttm/ttm_placement.h>
#include <drm/ttm/ttm_module.h>
#include <drm/ttm/ttm_page_alloc.h>
-#include <drm/ttm/ttm_debug.h>
#include <drm/drmP.h>
#include <drm/amdgpu_drm.h>
#include <linux/seq_file.h>
@@ -704,22 +703,6 @@ void amdgpu_ttm_tt_mark_user_pages(struct ttm_tt *ttm)
}
}
-static void amdgpu_trace_dma_map(struct ttm_tt *ttm)
-{
- struct amdgpu_device *adev = amdgpu_ttm_adev(ttm->bdev);
- struct amdgpu_ttm_tt *gtt = (void *)ttm;
-
- ttm_trace_dma_map(adev->dev, >t->ttm);
-}
-
-static void amdgpu_trace_dma_unmap(struct ttm_tt *ttm)
-{
- struct amdgpu_device *adev = amdgpu_ttm_adev(ttm->bdev);
- struct amdgpu_ttm_tt *gtt = (void *)ttm;
-
- ttm_trace_dma_unmap(adev->dev, >t->ttm);
-}
-
/* prepare the sg table with the user pages */
static int amdgpu_ttm_tt_pin_userptr(struct ttm_tt *ttm)
{
@@ -746,8 +729,6 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_tt *ttm)
drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
gtt->ttm.dma_address, ttm->num_pages);
- amdgpu_trace_dma_map(ttm);
-
return 0;
release_sg:
@@ -773,8 +754,6 @@ static void amdgpu_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
amdgpu_ttm_tt_mark_user_pages(ttm);
- amdgpu_trace_dma_unmap(ttm);
-
sg_free_table(ttm->sg);
}
@@ -958,7 +937,6 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm)
{
struct amdgpu_device *adev = amdgpu_ttm_adev(ttm->bdev);
struct amdgpu_ttm_tt *gtt = (void *)ttm;
- int r;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
if (ttm->state != tt_unpopulated)
@@ -978,22 +956,16 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm)
drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
gtt->ttm.dma_address, ttm->num_pages);
ttm->state = tt_unbound;
- r = 0;
- goto trace_mappings;
+ return 0;
}
#ifdef CONFIG_SWIOTLB
if (swiotlb_nr_tbl()) {
- r = ttm_dma_populate(>t->ttm, adev->dev);
- goto trace_mappings;
+ return ttm_dma_populate(>t->ttm, adev->dev);
}
#endif
- r = ttm_populate_and_map_pages(adev->dev, >t->ttm);
-trace_mappings:
- if (likely(!r))
- amdgpu_trace_dma_map(ttm);
- return r;
+ return ttm_populate_and_map_pages(adev->dev, >t->ttm);
}
static void amdgpu_ttm_tt_unpopulate(struct ttm_tt *ttm)
@@ -1014,8 +986,6 @@ static void amdgpu_ttm_tt_unpopulate(struct ttm_tt *ttm)
adev = amdgpu_ttm_adev(ttm->bdev);
- amdgpu_trace_dma_unmap(ttm);
-
#ifdef CONFIG_SWIOTLB
if (swiotlb_nr_tbl()) {
ttm_dma_unpopulate(>t->ttm, adev->dev);
--
2.12.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-09-18 17:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 17:33 remove ttm trace and add iova debugfs (v2) Tom St Denis
[not found] ` <20170918173350.9543-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-09-18 17:33 ` [PATCH 1/4] drm/amd/amdgpu: Fold TTM debugfs entries into array (v2) Tom St Denis
[not found] ` <20170918173350.9543-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-09-19 11:08 ` Christian König
2017-09-18 17:33 ` [PATCH 2/4] drm/amd/amdgpu: add support for iova_to_phys to replace TTM trace (v3) Tom St Denis
2017-09-19 11:11 ` Christian König
2017-09-18 17:33 ` Tom St Denis [this message]
2017-09-19 11:12 ` [PATCH 3/4] drm/amd/amdgpu: remove usage of ttm trace Christian König
2017-09-18 17:33 ` [PATCH 4/4] drm/ttm: Remove TTM dma tracepoint since it's not required anymore Tom St Denis
2017-09-19 11:13 ` Christian König
[not found] ` <1eef2bc2-742d-1737-1250-87c74dfb11da-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-19 11:15 ` Tom St Denis
2017-09-19 11:46 ` Christian König
2017-09-18 23:53 ` remove ttm trace and add iova debugfs (v2) StDenis, Tom
-- strict thread matches above, loose matches on Subject: below --
2017-09-18 12:35 Remove TTM trace and use proper IOMMU api Tom St Denis
2017-09-18 12:35 ` [PATCH 3/4] drm/amd/amdgpu: remove usage of ttm trace Tom St Denis
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=20170918173350.9543-4-tom.stdenis@amd.com \
--to=tom.stdenis-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=dri-devel-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox