From patchwork Mon Sep 18 12:35:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "StDenis, Tom" X-Patchwork-Id: 9956613 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 6E7BB60385 for ; Mon, 18 Sep 2017 12:35:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F6B628CA6 for ; Mon, 18 Sep 2017 12:35:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 543E828CA9; Mon, 18 Sep 2017 12:35:44 +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 3D8F228CA6 for ; Mon, 18 Sep 2017 12:35:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 766AC6E368; Mon, 18 Sep 2017 12:35:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0075.outbound.protection.outlook.com [104.47.42.75]) by gabe.freedesktop.org (Postfix) with ESMTPS id A51DA6E354; Mon, 18 Sep 2017 12:35:37 +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=uuKQkPcpAu0TZDudGXrOp0Sd+opK0xtJey/bcw4PLn0=; b=IlrYUjdtMg3yjcTDuQM6UILMBIW6xMWPQ4HuyS2ARebOVTXMOdmEOwMz2XcJl4lqsV9dMC9xT7Y5CvfHPPy9KxaOyGnxywQGAi+KaulYj31ijk57p1X7Z415plzbLghZBj32mQTuMCvwxU+3k0MqPdIaE5JbYLI9I9nk1eUYIrQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Tom.StDenis@amd.com; Received: from fx8.amd.com (165.204.55.251) by DM5PR1201MB0074.namprd12.prod.outlook.com (10.174.106.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8; Mon, 18 Sep 2017 12:35:36 +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 08:35:27 -0400 Message-Id: <20170918123528.26629-4-tom.stdenis@amd.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170918123528.26629-1-tom.stdenis@amd.com> References: <20170918123528.26629-1-tom.stdenis@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: MWHPR1401CA0007.namprd14.prod.outlook.com (10.174.253.145) To DM5PR1201MB0074.namprd12.prod.outlook.com (10.174.106.16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cefd3866-675c-4157-0981-08d4fe91c363 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:DM5PR1201MB0074; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0074; 3:DlgqOLIQB4NZXa1p+dJ9tTQjt5lSHVu/Xh3ZqOA5G8aiGpgMsCUXZtJP1kC2F2zwRHLFK81o+Fx5UMy54FfPYDqpRzEakzTHi+Mjh0eg5UcDCzYkChBSuwopbfkE+Lao7gzeRfFC4CyAK1hFTiFuAeT7lurl9qv3AKfBbfs5MrR8ZqK97/GWqc1VvkkvJ1z6+oybSCpMwdNpEfJZ5LJbOXoKEdmFtwLAB/o8+2bLpf5N1Pq2yKhvB6JtNhrPCsgv; 25:ew3y8LHUW+nLCctUOdWfOMHSmJLPY0vXiua3Q7bfrc2vP25gSpeOm/cPr451qQM4gfEfbLp1IrVoeewojUS7UDP7a2iSs2nUnaXRwfdBmMjRM+Y1PiFuqCOO1bNzb3PFDtldux5xRWYrAYQsAiXN8gHOaODc3CKkoKhBxPmQaIr8QO0NW98rBuXiHFXMJJ0Qz5eXjbPVY5YBqtzRww8yy0BCJybapvz5iTc0CGpYVJcLS66EGiaQZcKW59DtF8ikhS62PjnuFCmsq6hjboIBumkfkWpYCQPJpC6t8ZLjgI4LTdP7GFIJccPD/K+CBsDlSz6rx2ZsYeYtb+CSjjozkg==; 31:07ZalWO1HV9FTB/fkViMI7rj4RBs3iHG5rOGeI1YtEVLUWK+ElbPimiOVjUBXSMgcAdOlLYpCpLCMT/UJX0GVi59ITLrRSB6Txjs5Kd+z+hn1PndBMgfeFpYEiYQsLyfzvjeQAh0uXf6d+Aah4rg1QXoLzSr4ACbwoEEHat5OvnI6SIdwO27H5hIKcs1XF90pqNUj5gU2uZDe67+5npDgBjGEk1xPGR6q3dFoAQEBoE= X-MS-TrafficTypeDiagnostic: DM5PR1201MB0074: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0074; 20:ZBsU9nUECtseMHRinL4Knx24e95TvdMccbD6gPXfTWTnpxU+1LUG3D7j/P/4683uSVoKYb7J0D8AdW0laFsmnVpm1D1KNYHwEUDcta9obgGm0o7WNfazX/93fFclv1hIx6C9o1+ITirv5BMNPK9KBgstIW/ckNwImbIbXxC0wJspv4cGauI3Jf5Qq0ThTaO/5PqH85BM64bh9+mYsauFYR6MT0Xykji6dGzJnGqhjS8GFw8HAT337By8vTPjSyxJmy5bID+/WPmtwskc9VBSTP+YY/0l6IJ61/UQbnveEtc44EEpE3kIz2+QQQBTh1bjTaseX0THPjCUCuE8NsV3x2ChjjKfWvoJdzufYsbq3YeMIsfpPBENeXjtVjqEN5kdMhl4jfabUOFToOFXynTdd6WFbgGK8pIfaWQGaQlkV3yJkA3rJsQ6k0Qgpy2LkoijYBnIeb6Ek1awbm9g2bieCvSmTKOhvUtt1JKX461OZVf4guoYcB6NKGekf0cDeEEO; 4:uSdSmucJ6ZkxYJ+a6SG9SCLwzbm1ZgykRwfgdilglB/iIi1eglCkaoXXtDxNGiO3JxRRvDnOmqQlRV5j0C7uywNpQ7+PGYoBZLjobtPmNCeQzlfcgdtnrPRjy5vbEdv1YAjReJyEFD5LuGbX/7JwNQbFLP1hhcEhgdQ9/TnxhE2HbFEv3UCmeXOEbMC8Z8hrAxCdMyQXIj2tDSatWOhkECC84sJ2r5Zj9jfzgHGEQyQVwBi9GSR1ILYjQErD/87n9aBJSOSJV6Qnt0pfWuFkFfEEaIKxeidaY2b2sSXAKU4= 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)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(20161123558100)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR1201MB0074; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR1201MB0074; X-Forefront-PRVS: 04347F8039 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(39860400002)(376002)(199003)(189002)(101416001)(81156014)(2950100002)(53936002)(4326008)(16526017)(316002)(6486002)(6916009)(575784001)(86362001)(6666003)(8676002)(7736002)(2906002)(66066001)(189998001)(305945005)(81166006)(110136004)(16586007)(97736004)(5660300001)(36756003)(2351001)(76176999)(68736007)(72206003)(25786009)(450100002)(50466002)(50226002)(3846002)(6116002)(33646002)(48376002)(47776003)(5003940100001)(478600001)(50986999)(8936002)(106356001)(1076002)(105586002)(53416004)(2361001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0074; H:fx8.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; DM5PR1201MB0074; 23:fvUj3agfgciOyyMhC+l7m/T7D77TJuKsgLt+oOJ?= =?us-ascii?Q?Sv+dYIBtZrF62r6i3Kxx1bvYyuy3a3GMw91wJ0GIN5FG+WForYQuldSDeR+v?= =?us-ascii?Q?/ESS9qxaIfkMaZ15WZRpCSKKI+1fZzOVhF8842Qp+XBA57SZExCbCXMQozWb?= =?us-ascii?Q?+dUQX54p/IRkDOjqBO1XKcye2WRkiok05tLQgWBKBuaoZACarFgj1gPuOGy2?= =?us-ascii?Q?i/Qnvh1G8sxx+H3x0qCXuTM/Wmk6BL6PgV7lOC9m+jDBgqQfCA7esMTDcw+3?= =?us-ascii?Q?MLXX+uUYtTOAiENUU7c1ECt1W1Vk9ADRLuXE46XqKlwjxX4NhpGzXZ5FzSBx?= =?us-ascii?Q?Q678V3HnAMWlU+yDFsdovPDfM3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?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0074; 6:GeKkfPmgmg8Br+/gDmARM7iI/tE7O6uRs+xgHjQ9tbFtoiaYsYduvyN5s8RlOzIf3UqSdtBuj4ZQMSKPBbZpr02zarlhEtXWNBKHLT9SLDt4ZcRs/XDWP3kreXQh8H1PtdMly7a6pm7U/BBq3syTrkQmTFq5RMr/Qp4FKnSDJrPxFdAEjUHQNE8cY0NTIGc+l0BUqr7ilLrHVgHZk25SrgRultKDF/byq55l4Bi3rSD7veCsNxgkJ5qWzLXZm5+m9lDtgatbIx4VKFL5xZ55GYOKG/SGYLFYtD6ZKz1wNXphZvnDuuKVZhz5dpYVUn344Dcz1cAxKX3B+RFf5nXdTQ==; 5:KmTONG0GWoYEajptpxnOrSSt1PFFHwRqH3MDFn1VZuivbQqQMuDEt3jykZ86peftsFPlyMIkB5cKvhuFRIr2ORBdRZvspfcOnuIhppH2gc9Z4Or92D/Eww+fPIVhp0tqE3FQu6vLDhmrX3vazb4CXg==; 24:Z23Gxcao+9SJTGU5n5uBlhvu95qi14uMgfEXCwrZwEdn+ua85kUK+MZkX9Hqohh3OS6+xQKq7US55a/tgnYMZQDpkqWn9tI6Dub5O+nMEpQ=; 7:RvecfEzbZajejBBnkcox7VtBhABE6vAJTtYci/E9MiGsx2NmnKt6SqIzULuLo0oXY/EfJCaGlHfaZViOY7vo+BA/P5B50GqFetDfhgfU2lj/oxlBsiyHMuFZynuOseo3V4P7wiTgdM2bTH9234jhqzdA5X7eXr2JmQG+F8l0lOnDcG37+0uLlXFj/GEP26ESAV7FLS8tKKMsAHhAFIC3guYt40NljKuskjzyQ5nkxR8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0074; 20:1FPyJPi6iDvh+DVvBDTFbDE4F/L2e6CHunhDaPX6b10ObPrvW8Z3Ec5kacYCxFbvtU7gtiXFjHaxlE0eJSuJQh+XBEKKnz9Kgw/PpnWggZlh7LNqMal4M/mVcfvpL7b2ew9s6YqzB9sJCjv11M8IPxcQovQmnLza8ecwXqt6ZZDK0c8ZCd9NBTHfPQY8BSkMBtcI9umHX82LD1i+GLLcyunYW5Q4tKGC1kAOjGLZxOyNPOxbR9h9H0qWr4W0f/R5 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2017 12:35:36.1905 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0074 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 --- 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 b4c298925e2a..e0c37fe4d043 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);