From patchwork Wed Dec 20 10:34:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "He, Hongbo" X-Patchwork-Id: 10125417 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 CD1946019C for ; Wed, 20 Dec 2017 10:35:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6B1128907 for ; Wed, 20 Dec 2017 10:35:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAE78289B3; Wed, 20 Dec 2017 10:35:55 +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 1CFA028907 for ; Wed, 20 Dec 2017 10:35:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 828F26E0B0; Wed, 20 Dec 2017 10:35:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0043.outbound.protection.outlook.com [104.47.40.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2296D6E0B0; Wed, 20 Dec 2017 10:35:52 +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=i3PD83YA7L8PcVMqD7/CZNiu/9WBqx4UsKpdSw1CiW0=; b=mYwaflT/zsK+FDRcaExRM3gab2YuW1X0SdkhZVeAFVsL+IiQHhXciDfk8yHjDjBOiQc4NCsqs8GKFhLEG26jyKOXma6maS/0Q8jVHqdrV2xYwYORKk+EuQhqUVWi239VLMSOUrSLTLQTXofomuAP1d4y59dTJcLp5ZONtbduYjY= Received: from DM3PR12CA0113.namprd12.prod.outlook.com (10.161.150.161) 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; Wed, 20 Dec 2017 10:35:50 +0000 Received: from CO1NAM03FT015.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::202) by DM3PR12CA0113.outlook.office365.com (2603:10b6:0:55::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Wed, 20 Dec 2017 10:35:50 +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 SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT015.mail.protection.outlook.com (10.152.80.167) 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; Wed, 20 Dec 2017 10:35:50 +0000 Received: from roger-build-server.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.361.1; Wed, 20 Dec 2017 04:35:49 -0600 From: Roger He To: , Subject: [PATCH 3/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc_page Date: Wed, 20 Dec 2017 18:34:57 +0800 Message-ID: <1513766101-15993-3-git-send-email-Hongbo.He@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513766101-15993-1-git-send-email-Hongbo.He@amd.com> References: <1513766101-15993-1-git-send-email-Hongbo.He@amd.com> 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)(39860400002)(396003)(39380400002)(346002)(2980300002)(428003)(199004)(189003)(50466002)(48376002)(81166006)(8676002)(2906002)(81156014)(8936002)(77096006)(50226002)(36756003)(16586007)(104016004)(7696005)(316002)(110136005)(68736007)(76176011)(51416003)(97736004)(478600001)(2950100002)(105586002)(72206003)(53936002)(86362001)(356003)(575784001)(450100002)(53416004)(305945005)(47776003)(6666003)(5660300001)(106466001)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1445; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT015; 1:ZMbgDbT2ZSIeo4CM45JIH8C4R7bJAoUYb5VQ2VYyJIC1LrGHUzJF/uCmUlxEPWCTeA9zGNsJce5Zz/6Ntp6WccKJdruGtyM5WLL6UsF2B8HhWZo61nyIFsQw/p8GTsBK X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7f0da0e0-0470-41b0-bfe5-08d547957097 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:CY4PR12MB1445; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1445; 3:nMTQ5Cl/sMY7+j085e5w5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SL5n7WtW4VrIv0AtVtnEa8UwVyTI/gi1c0aeyOu5K/zyDcT7t/IxhRyexOeVTFhqqe5TaPLUS+LNj3dsRSJwfJNWd1CcDa5KdkC7PhtZbhT/l7uph2cmsW5brI+raU568jNGnSrpgXpiS6ZI53+rIjvXDXpdqgw8R7F7JPO5Ba5tq2eC194HD6CFkg9TZIBKPFoWX8qj5JhF8ihb0gcp2aDAUeTY//ZrQK95T0P5ewplVnk6Qu//ob+I9dAIN/S51vy5eD9PTQU/qqDOYTgK0oAmJmIU0KCHjRQSjz4x0pxIl8YWZBOL3uD3dv3dhxIYveS2QXsxDZtYuIsg7/yaawfHyGR9DiWQMNkBG0ErKwiNyuZaDQgeWlRkjuRXe1MzHO7uJqzbjSQ/1kzBTN1euQGyzhibc0jAzhNPLskl/2DoY6oEnN7TxnYjcPSSIcF0W8xNZcAson 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)(10201501046)(3002001)(3231023)(93006095)(93003095)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:CY4PR12MB1445; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR12MB1445; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1445; 4:n8w19i9C9woEvBXKWoRSOMCAR33LLQmop3dOdGPlHozetcKxNbnur867eLJOrG+FLNCceLXpDf07Ql/CwbcOiAes5uCRFCcuOf5zVfcefTP8Hq79MTcClhROZgLrnj5EwcpTPYsAeFWOwkKdXco+oVULBgJyadRI+sdI6zendXe8R3M8BHkxFc7LoU8N9ebpV1DpKW3xwuXcvsNn/ihanAic/StkTCJOhrE8J4tCmSyvsVwZU1K3KHNMmAkIQW2T1igDSkrZWD4bba3/ov8iFAcUQjOAirXVz/xdJ8dWLZ6Ay/9alnK7ZriebTUFQr4B X-Forefront-PRVS: 0527DFA348 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1445; 23:BTGaJFed/x29NZ9FK1gG8BRocgaf7dJh58oXoVhUm?= =?us-ascii?Q?6y40Gdjl6QGb2goagX5koV/QboBAaj3WUMOiNHfrFsCGBqTbqMDAXozATgIx?= =?us-ascii?Q?fsTxPu8n3V/f4eNOz7jXYaqSU5ndCiV55FW2VDK71s08n19hkWz/4WshI/dc?= =?us-ascii?Q?aZ9nPyAeglImdlgyDMtWvLVYYpQTg5mJ2Lfs0LgMvfjCYj847ngljfiRkxbj?= =?us-ascii?Q?4EJcUFH+2hijhOso/ccx7WAsAoyp2cq6ZJj2R6nbtxLutasM+78CKhtcAjMB?= =?us-ascii?Q?qYHV8z3ipN5HkoKlH9jFnDrJQUSCEvwi0Qdjytvhz7XU8H4hHcmv6HDb62M9?= =?us-ascii?Q?CbYtWZbL7HDsQSkDrNuhmYCxTRVzInGWpmiLH0koxEeeOmGi9nXrD3VGXniy?= =?us-ascii?Q?jz0uD3PKKE0eZgJsmdN9X5WiYTpooKQN42eQRh/AZq7ej2yS9QXEoyg6CNar?= =?us-ascii?Q?NKIaDI3DPRnQHhun9v0GKAtrukGzkwbgSQwMoglGnFq7yKV0TamrKnKP0vXk?= =?us-ascii?Q?JRwfwhBZgVMBjGip4S6qKepWKKo4LJCPsmY9528dVBO4THCQ+qv54cbqPkm0?= =?us-ascii?Q?RgocVtELtbNgyMnIzFmvbE0ltS0BNQNc7/YCzyTKNLCGOS2rRbx2PsOVj4BE?= =?us-ascii?Q?0yuwLULQTj+6I+V5yPHNTNS52oUSTDf6PBG4BTWVR0SPqQ0waoYhsncDc7O+?= =?us-ascii?Q?BTmsOKiO8jDnSepCPgsP76WgQjfVJa0+CylrU+Nuw1uOqK7z+CvOWiMHoyCq?= =?us-ascii?Q?kTJVTJ1SPG0XMydKWdLMI9KtoHClASV9AMjeP6sTWJ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tfMQkObvRc3PQg//vaFfhxkut5LKacOb/7XypzZftJ5bK7hmm+f8Xv10aiG1xZAeK073RLDcDAYYxrv6MBkeeMDEqqofpsOrT5p8Z7DP1ASQ1X7CSlxLPXA0A4ubBLXdqpvqXd1McX03WLkP6s7ybIOGw+nEf0Ko9+rEttFhB9evTvTl8IpXC+da5pILeW+BqLmPrjmwEcu2gnj/ETFvx9KX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1445; 20:aCMKt5PyIigxcIYHuxiLOH7/IiOVu54l7C6cerUaksH9w0LMSrZFAQ47c+0VLMuwqYvqlrGfw/3NeyD4gQKYwXxAc2LF+aYVR+dU6GatVVtPvSlP9/b3QQBoCud4hAIZcq1szLD+YQEGe+5h9UYqrkdVC+yOYSt4bIQANSvLulJyPzRSeu7pMlZNive2MGFf0xs+NZevSU5AcqCby9N8AovMidQJNXfyltVCze0s0QAxvzMjhZU/L0KS4pVKg7dv X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2017 10:35:50.5610 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f0da0e0-0470-41b0-bfe5-08d547957097 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=[SATLEXCHOV01.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 Change-Id: I4104a12e09a374b6477a0dd5a8fce26dce27a746 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 15 ++++++++------- 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, 21 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index 525d3b6..8df0755 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -539,15 +539,14 @@ 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) { - + int ret; struct ttm_mem_zone *zone = NULL; - struct ttm_operation_ctx ctx = { - .interruptible = false, - .no_wait_gpu = false - }; + bool tmp_no_wait_gpu = ctx->no_wait_gpu; + ctx->no_wait_gpu = false; /** * Page allocations may be registed in a single zone * only if highmem or !dma32. @@ -560,7 +559,9 @@ 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); + ret = ttm_mem_global_alloc_zone(glob, zone, size, ctx); + ctx->no_wait_gpu = tmp_no_wait_gpu; + return ret; } 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);