From patchwork Mon Sep 18 17:33:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "StDenis, Tom" X-Patchwork-Id: 9957221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C6790601E9 for ; Mon, 18 Sep 2017 17:34:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B129228D6F for ; Mon, 18 Sep 2017 17:34:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5F5D28D78; Mon, 18 Sep 2017 17:34:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 57F1528D6F for ; Mon, 18 Sep 2017 17:34:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA56B6E3CC; Mon, 18 Sep 2017 17:34:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0086.outbound.protection.outlook.com [104.47.33.86]) by gabe.freedesktop.org (Postfix) with ESMTPS id ABC7C6E3C8; Mon, 18 Sep 2017 17:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=podmt/LqmvVVv7EWGjXTrfjjl9cOOLN4l9yRTnu0PgQ=; b=pJnt1MeuxYpzuP19y826OVGyIOAacMr6xwErXdvKrWgnaug7S1WW+0qSsUM+g5jkQyalubNKP6U/zFbqj2LL7ClGvL1G57wGTMGm88bqCXg8CXRhy9Y4slykFLsybFGdlrBLD2hh/dSuytTeKuno9wQ8V+2welBmZ2AiJGFigf8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Tom.StDenis@amd.com; Received: from fx8.amd.com (165.204.55.251) by MWHPR1201MB0079.namprd12.prod.outlook.com (10.174.98.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Mon, 18 Sep 2017 17:34:01 +0000 From: Tom St Denis To: amd-gfx@lists.freedesktop.org Subject: [PATCH 3/4] drm/amd/amdgpu: remove usage of ttm trace Date: Mon, 18 Sep 2017 13:33:49 -0400 Message-Id: <20170918173350.9543-4-tom.stdenis@amd.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170918173350.9543-1-tom.stdenis@amd.com> References: <20170918173350.9543-1-tom.stdenis@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: BN6PR06CA0031.namprd06.prod.outlook.com (10.174.93.20) To MWHPR1201MB0079.namprd12.prod.outlook.com (10.174.98.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c837f33-3a68-47f1-f6ec-08d4febb73e9 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR1201MB0079; X-Microsoft-Exchange-Diagnostics: 1; MWHPR1201MB0079; 3:wZHVWRmxRLHAMSpH4UTtgPsODKnHSMkwclf9+F8R5dID+6PGp1e1vPmD853k92BwjmlAFS+TIlGzmtSLstlmUE1J82UqKitBKlk2YKU/mYf4EdMx731F0uJqRnWUt6+BUlaUG7Y0z/gyAju0naLbcKyzb7xx6GbkEWzjFEo/MWOVQPBU7hf7i05heO+YLYW9t50Vr/IMOUo0eXJHMmabAethdoUPkJf+I/BvgypGLBHHsrBbnDAxgntnqYtwfX+z; 25:cw1E7eRvZMcfCw9Vdrx8ozE/bW7c0FHKZ0ZWEkmXb/3tJoJUDb9zXBuaHb6SX7MT407CN33VIaqXmbR4YPfelZPe2Ma5ic0mvbfn+JaPUjVnXmexrN1U9x5So3TdrWoXom1GSE5oerBF7Csk1NJwTZibFdiJ3QZsd1lqsLOpBQZiU7PnsP5C5z0qSExaxZtTrUnPq8u62ZBb7aULYzjbA7tOt3Uyzi09YXBjyM0WOvxX2OYlHRhJ4ctvt01OIGcCzyBWx9CzxqVUuRFw8UVyN5RmvXbSRUk3NSQ3JI/DyOmyFKftLYbyQWOTMPT/w45RK03QQz8lajuUCYPfLV7ATw==; 31:w3ck/IrmC5QDAxC3wRurwHSyX5FzOnHBdWEQH0NiSQYgQhWBvPkoDhc1Xd9zpWtKQ+iu6uJ/S90QFBjXJalosQ2eORy2E1EKS/CJ092XVbWdROujqd9ChdjCX7VUoAMgbWSJ3vGV+5jsNjDmZPgIyK+JWQXK2LP8VyeSwC5Zahgw8DgHPpBeRm21q6Ov384Sp6ptvaFIuJHxFB5yeuuAvz3QaSfX3Xo/lQzvTcs9yTA= X-MS-TrafficTypeDiagnostic: MWHPR1201MB0079: X-Microsoft-Exchange-Diagnostics: 1; MWHPR1201MB0079; 20:VtC4V9DKJX0Iw7OCTeWt7vMjdZavOSoIcQoaWLPPPhmEc9rPOpaZfvcjjhqFtLTYZSspS3iU92FDng5Ty1S3ITDLk1sPqYBwglTolIGQ9UZESMvOItWhHqTfweYNgPqPdMHdiRpHOU+D8N6romu1OdDekFgpyW5nRe7W/iMfsEgJI8bgFG65ss9tyVdimUEiy1qtbxs+w0z4Ivm2ifGBa0hsIg08mdnXbBiRdelQWP7bOBh8zYs7fcPCP68AqIsu83d26/O7S1FMpaATc8ZI/GZbPvYZ4JJpTrhzXtUeoFXz6fylG40qEt72pIw8n5rV96eIlwTmBGaQMsbGz5xPB1h/q+KOTLvBazmYE9iMVZO6T94DHzVrNMExA1+Z8pGxiZqnVFAhCsz18Rfy42I+zTKp9WuxZiq8O7HmHtgv+jRiV6Y2v2Issky6NsrFjbZOzt7C1tyhhXKeWCT+voyzlofGcS/5SGXQ5EogdKTssnnPLtt6tTS369dzrc9IcrOP; 4:AD8P/ovKmGw3glm9bKv64VOzTUXGHsiLpXpHoernW2zSAoMLJHlvrx2suCYdBaZhJ+snkZ56/w+OK7S8XssfHqmg/VLAfMwPKQWSRcD5kS55zRauh+5rZt8H2NPCioBdNbDnRWGFBjuqbMYqKM0VSErXkvYPtId5d0xsTwwx0qBw/jE2TC5xgzwOzoJNyqYp2pFU1zucj069GWql2VACuF/yX31v7acIHu+5pU4ciKkn/OMsqWlFG+2vPrTzGgRTsqf9xxpPNWI/zXHZGL7WrWRrJXxYL5sgSY+kP4APcko= X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR1201MB0079; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR1201MB0079; X-Forefront-PRVS: 04347F8039 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(39860400002)(189002)(199003)(25786009)(105586002)(72206003)(68736007)(53936002)(2361001)(33646002)(76176999)(48376002)(50466002)(5660300001)(36756003)(6486002)(450100002)(110136004)(478600001)(6116002)(16526017)(66066001)(3846002)(1076002)(47776003)(16586007)(86362001)(2906002)(6666003)(50986999)(5003940100001)(305945005)(8676002)(81166006)(81156014)(106356001)(7736002)(2950100002)(316002)(6916009)(2351001)(50226002)(97736004)(4326008)(101416001)(8936002)(189998001)(53416004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR1201MB0079; H:fx8.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR1201MB0079; 23:uuSZ/Fwm42jDgBHWOoVqEravdUmq8K5yfWE555K?= =?us-ascii?Q?9vjcVwxb9bewa+ru8fwMecn+tSGTuLLGtOHsuecnzad00g1vswDhPXVXRM0J?= =?us-ascii?Q?0PXyYy4b4pHKwEJcFYpFhFzuemj8gxD08RFF297qg3FWP7R5zOGfs2LhFdek?= =?us-ascii?Q?50C2mzbvRIE2DMDWYcmOCZ/clU3PVYtTvV4BmeEa/m0OmjcAHU6t/946xyNy?= =?us-ascii?Q?wH0VR+AlJk5u9CA8+qNUB1MFTf/WpjWQwJn9FzO+PmDeyjvWhRovD7QyTO+y?= =?us-ascii?Q?UlJKg2MQ+L1lmYNrWin6KOn/lOfYpMcAb96bRoL8kJ3vvdCny/96UUpzWtfx?= =?us-ascii?Q?zidZWlueKqVscvAo81YI1nP4lC62JitHofFK8VjnSo2AgySPB/xa7O0bF8nP?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Q2gNPuPhr7at+EWptxCziGlm585ak2lgQt5gir2wMYrqpdO2VPKrsiBie7rWTyZ6pMNT/w4skG9XJuFulmoQx3Lrl X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2017 17:34:01.6728 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0079 Cc: Tom St Denis , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Tom St Denis Reviewed-by: Christian König --- 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 #include #include -#include #include #include #include @@ -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);