From patchwork Thu Dec 21 09:42:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "He, Hongbo" X-Patchwork-Id: 10127247 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 98A0B6019C for ; Thu, 21 Dec 2017 09:58:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97D8829B8A for ; Thu, 21 Dec 2017 09:58:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C92229B8C; Thu, 21 Dec 2017 09:58:16 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, 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 E1B7429B8A for ; Thu, 21 Dec 2017 09:58:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 330346E5DC; Thu, 21 Dec 2017 09:58:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0057.outbound.protection.outlook.com [104.47.38.57]) by gabe.freedesktop.org (Postfix) with ESMTPS id BC6DC6E5DC for ; Thu, 21 Dec 2017 09:58:13 +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=1IITtmZ0t6KZsZVOCNUBjV8+E4eRDn+8LY2SvajpBrU=; b=PFbQPQqQPqGVKWDBWhUWkO6YhrqEHLDolN0uOjgsqo3Mz9wwvkk8qVp1WY8+dK59cMTzha07pQu2gGHPTEn9Mzj3UU9FBHezK6lVRN8Sg5/t2JHSe5kE/RPpV8AiIDAkbu/qsxQ7UaBZPX5k8ssqGgMokJrcmqbvkRG/NC7mfs0= Received: from DM3PR12CA0086.namprd12.prod.outlook.com (10.161.151.158) by CY4PR12MB1445.namprd12.prod.outlook.com (10.172.71.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Thu, 21 Dec 2017 09:42:59 +0000 Received: from BY2NAM03FT035.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::203) by DM3PR12CA0086.outlook.office365.com (2603:10b6:0:57::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Thu, 21 Dec 2017 09:42:59 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by BY2NAM03FT035.mail.protection.outlook.com (10.152.84.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.302.6 via Frontend Transport; Thu, 21 Dec 2017 09:42:57 +0000 Received: from roger-build-server.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.361.1; Thu, 21 Dec 2017 03:42:56 -0600 From: Roger He To: Subject: [PATCH 1/5] drm/ttm: use an operation ctx for ttm_mem_global_alloc_page Date: Thu, 21 Dec 2017 17:42:49 +0800 Message-ID: <1513849373-7970-1-git-send-email-Hongbo.He@amd.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(346002)(39850400004)(39380400002)(396003)(2980300002)(428003)(199004)(189003)(97736004)(47776003)(50466002)(7696005)(2906002)(77096006)(72206003)(478600001)(6666003)(50226002)(48376002)(305945005)(5660300001)(316002)(16586007)(8936002)(36756003)(6916009)(81166006)(51416003)(53936002)(356003)(8676002)(81156014)(106466001)(53416004)(2351001)(104016004)(68736007)(105586002)(4326008)(575784001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1445; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2NAM03FT035; 1:o2Pu2fBp8GG5jP/Z2sS8zSgmxWTdVeVPGz7ZoswtE3HZLc9NjgwEzntgBeVEAJhDR55Zx3/NOjBOM2jQsyMOtDR36nFHpy0KaGajhTNobyHbF6YNdsti0KUJ0iopSK/+ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1d7c221b-4288-48cd-babb-08d54857380b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:CY4PR12MB1445; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1445; 3:w8FrDXz3oZeMY+ySXRy2K6FWSy3TK5sT1/V+WxOFfSB4mjdqOvnOEp06wjw6HQavRY1Ovhk3XtZrOK8sleVu4kIBQXr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5vCsYGHp7e3Vp4PRjQF0Z7GlcPK93ZyAVNgduLlTFv5qBJXWKiM4CrRv8xvhY15NMlvbtmdl5FbMbCyKC+9OBdp7AmsO4n3/qK5onCTs49cByGtoXCuUQ6ZilbPimZB3x447q1oB7XRRuqFv/VAAEB800Yxf2bhX4jClxxcOtOQ2muQeHr/mSZafE9wFiNOfgVKE6uEHy1lZEmdzQ1CeoYRLXwXgytIwvuqieoIGRmI4jXq/cO5ZaNS/LshnqFmnNJId/SvzExYn/gb7ygfDm6B9HmNj82xmvruvZvfZV0mFvr+IWPBWTafRl6UAKP2DTUG4EoqsyqsT6yYsavsyx+fSAt6lrnEKaw/NH99TL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3231023)(10201501046)(93006095)(93003095)(3002001)(6055026)(6041268)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:CY4PR12MB1445; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR12MB1445; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1445; 4:bRK+KPi8Q9mWxhgI4G5pHWT14DLlL9CRau9C0vzccA8hVSZpFqzx+Ni7Wb3hQKV2YzHd08eACjofEltdBitsGbXqerojfvnTOQHX23xcSdzoIXkXUsSr4EEYNJMtO5iXVd5J/9u/49ZtMhR932mE/Ym6EpEJhZUc3FXD56nmTN5rNzlqh2EB64U/2gIoDykHcscEbehwEfwMa07yVEQ6BFr9+zxxaZKnZq5G4DQ0sE4UiFQxmW93+hH1K7L1C+x5I5Uqbxs6SXFufERK/gSJ3Vj5JOJHim54eCZZiXph9TFc9Tmuj9DspqqQE47qakIL X-Forefront-PRVS: 0528942FD8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1445; 23:IIgHdxBFOgm/VlgPJ5BrlfjL1Dbc19ePPvenzVvw5?= =?us-ascii?Q?nT8156jz09PuiqZSX9gQ5luxR22iHoXjgxpOmhaiAEwiJpUbPY+867+kIfzO?= =?us-ascii?Q?yD8EYQZJMfh/JvV4ahZDUA73yecPzVlZPwKHz/2biswBuleHRNY/KOajwuxL?= =?us-ascii?Q?F1B+qsaWBgkFWGZr75dycyCqwYX5PXviOqIRMWqE2NFwnugkoWxDg1gxyNe1?= =?us-ascii?Q?vWd7rVLaMrKCLiIj3563H+c6XCBs/EfivgznnaX8uhg6fHGTDULQlc1zAqdJ?= =?us-ascii?Q?O/8Q7D06UCVAGqDGwcNRl8Lfyz9RclF8m7EeTdd5+jvqMOroCgqQHnVqifwS?= =?us-ascii?Q?cE+yyHqgOL6AyPA1gKOMe68VrWQtAB22Iu9mDYmdX5CsAavM95H7MOAiKzpm?= =?us-ascii?Q?7GkhJmZemLkZakJsWqf1/GR8r041efXG/n48gdXi7A6e14Dkmd1Aln3fTf61?= =?us-ascii?Q?rsXfeY+yuArv6pEEfVjAM29/0aDEZaaIsi2GPSnCKDlXx10+CbNQydYdr7Ug?= =?us-ascii?Q?mXnF03LLPmZjTI7BheU0zCeOyvandjjPl32KJcYcZPdWFPhDATRDRKVw60Pu?= =?us-ascii?Q?yhF1sqvxgwY8QnkRM6DoMha+dibKacQze9ojqTBKnlEvzjs//6iD9l9+49od?= =?us-ascii?Q?qzDfRcgoSuVn27SLNa3CxBapoN3cArzSV6eoCCTwTilU9MV0QzkXkHkK6XNU?= =?us-ascii?Q?7B/bOyczlGEhOdgYsxxy7XpjsEz6Xy7koaWQNLXRyqtDsXN5T7PQgkC/xVxY?= =?us-ascii?Q?POUMuFSbGp62erSFeqYP/aO/vhW/oUHJdY+/+Wi+LBq88S67dwH+UHDP+HLX?= =?us-ascii?Q?VCw52SYlhtt7LxmgyDco6jhucaVh3S9d/F+e3yXp0l5AYsEVFTtbS0ENmyvl?= =?us-ascii?Q?6l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ExkvNcZId8+072I0dFj4jNGdXfX21Z9ljG2b SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1445; 20:n89aC8KxtvKcg75dCrGzLC5zD6AO/3Vwl1rLFvVrqw3wP7+sxrZU0JDx+rsbAmMWRCh5OuFmHJl0r9Tu2LLLXXCldg34oLQHzNYfIO7aCfnjrNAKfERo6OibwS2OaTzpAvkVmM2o6jp9JyaOVSaSVtQSCsE06lwVgwgwC8XnwuC1CMUZwbAIRgM4C8k/Vo5Cch0CKEK9oaqfQ/1oni1Qj9LuidFbiUmn/MB32Zkd8BFwCTA95YNHXmZBrFbwOtTe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2017 09:42:57.8221 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1d7c221b-4288-48cd-babb-08d54857380b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1445 Cc: Roger He 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 forward the operation context to ttm_mem_global_alloc_page as well, and the ultimate goal is swapout enablement for per vm BOs. Per vm BOs refer to all BOs which share same reservation object. Change-Id: I4104a12e09a374b6477a0dd5a8fce26dce27a746 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 10 +++------- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 +++++- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 8 ++++++-- include/drm/ttm/ttm_memory.h | 3 ++- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index 525d3b6..102b326 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -539,14 +539,10 @@ int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory, EXPORT_SYMBOL(ttm_mem_global_alloc); int ttm_mem_global_alloc_page(struct ttm_mem_global *glob, - struct page *page, uint64_t size) + struct page *page, uint64_t size, + struct ttm_operation_ctx *ctx) { - struct ttm_mem_zone *zone = NULL; - struct ttm_operation_ctx ctx = { - .interruptible = false, - .no_wait_gpu = false - }; /** * Page allocations may be registed in a single zone @@ -560,7 +556,7 @@ int ttm_mem_global_alloc_page(struct ttm_mem_global *glob, if (glob->zone_dma32 && page_to_pfn(page) > 0x00100000UL) zone = glob->zone_kernel; #endif - return ttm_mem_global_alloc_zone(glob, zone, size, &ctx); + return ttm_mem_global_alloc_zone(glob, zone, size, ctx); } void ttm_mem_global_free_page(struct ttm_mem_global *glob, struct page *page, diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index b5ba644..8f93ff3 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -1061,6 +1061,10 @@ void ttm_page_alloc_fini(void) int ttm_pool_populate(struct ttm_tt *ttm) { struct ttm_mem_global *mem_glob = ttm->glob->mem_glob; + struct ttm_operation_ctx ctx = { + .interruptible = false, + .no_wait_gpu = false + }; unsigned i; int ret; @@ -1076,7 +1080,7 @@ int ttm_pool_populate(struct ttm_tt *ttm) for (i = 0; i < ttm->num_pages; ++i) { ret = ttm_mem_global_alloc_page(mem_glob, ttm->pages[i], - PAGE_SIZE); + PAGE_SIZE, &ctx); if (unlikely(ret != 0)) { ttm_pool_unpopulate(ttm); return -ENOMEM; diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index bda00b2..8aac86a 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c @@ -927,6 +927,10 @@ int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev) { struct ttm_tt *ttm = &ttm_dma->ttm; struct ttm_mem_global *mem_glob = ttm->glob->mem_glob; + struct ttm_operation_ctx ctx = { + .interruptible = false, + .no_wait_gpu = false + }; unsigned long num_pages = ttm->num_pages; struct dma_pool *pool; enum pool_type type; @@ -962,7 +966,7 @@ int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev) break; ret = ttm_mem_global_alloc_page(mem_glob, ttm->pages[i], - pool->size); + pool->size, &ctx); if (unlikely(ret != 0)) { ttm_dma_unpopulate(ttm_dma, dev); return -ENOMEM; @@ -998,7 +1002,7 @@ int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev) } ret = ttm_mem_global_alloc_page(mem_glob, ttm->pages[i], - pool->size); + pool->size, &ctx); if (unlikely(ret != 0)) { ttm_dma_unpopulate(ttm_dma, dev); return -ENOMEM; diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h index 755c107..8936285 100644 --- a/include/drm/ttm/ttm_memory.h +++ b/include/drm/ttm/ttm_memory.h @@ -84,7 +84,8 @@ extern int ttm_mem_global_alloc(struct ttm_mem_global *glob, uint64_t memory, extern void ttm_mem_global_free(struct ttm_mem_global *glob, uint64_t amount); extern int ttm_mem_global_alloc_page(struct ttm_mem_global *glob, - struct page *page, uint64_t size); + struct page *page, uint64_t size, + struct ttm_operation_ctx *ctx); extern void ttm_mem_global_free_page(struct ttm_mem_global *glob, struct page *page, uint64_t size); extern size_t ttm_round_pot(size_t size);