From patchwork Tue Dec 12 09:33:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "He, Hongbo" X-Patchwork-Id: 10106555 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 DE46E602B3 for ; Tue, 12 Dec 2017 09:33:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D735E29B66 for ; Tue, 12 Dec 2017 09:33:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB14229B69; Tue, 12 Dec 2017 09:33:59 +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 2F24329B66 for ; Tue, 12 Dec 2017 09:33:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B377589EA9; Tue, 12 Dec 2017 09:33:57 +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-bl2nam02on0044.outbound.protection.outlook.com [104.47.38.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 26BCB89E1B; Tue, 12 Dec 2017 09:33:56 +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=BgxndeYS/HLx900w5E8vWZz40i/AnxKRxQI09tIuXao=; b=PIcZjdOCJ74JqjBY1ztwzBfv6n7IhE61+hq00emS+MYxdpTgLI7OB8wxH4nBptNwY1vnNvIT0e/PlP9fPtaExbfaV4+CPrZrlnZb6GOxsIFVgfVAkgf80yqQbtIXK2DM7TWrjl1DI6dVHiANpfW77yV4mK/HmWpXGGf00aoPD6c= Received: from DM3PR12CA0059.namprd12.prod.outlook.com (10.161.151.27) by CY4PR1201MB0055.namprd12.prod.outlook.com (10.172.77.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Tue, 12 Dec 2017 09:33:54 +0000 Received: from DM3NAM03FT031.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::209) by DM3PR12CA0059.outlook.office365.com (2603:10b6:0:56::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Tue, 12 Dec 2017 09:33:54 +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 DM3NAM03FT031.mail.protection.outlook.com (10.152.82.199) 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; Tue, 12 Dec 2017 09:33:53 +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; Tue, 12 Dec 2017 03:33:53 -0600 From: Roger He To: , Subject: [PATCH 1/6] drm/ttm: add on_alloc_stage and reservation into ttm_operation_ctx Date: Tue, 12 Dec 2017 17:33:43 +0800 Message-ID: <1513071228-29551-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)(7966004)(346002)(39860400002)(376002)(2980300002)(428003)(189003)(199004)(50466002)(2906002)(305945005)(53936002)(356003)(51416003)(5660300001)(8676002)(48376002)(47776003)(104016004)(7696005)(72206003)(77096006)(81156014)(81166006)(36756003)(4326008)(53416004)(110136005)(508600001)(16586007)(316002)(68736007)(50226002)(450100002)(97736004)(86362001)(106466001)(6666003)(105586002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB0055; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT031; 1:0N1cs98n5VPISIFMXar644+N8nltz4yHM4TXUUQjhsPYDkHvHsC1dHYRBDHELVf0pQdFtUS95YfNylOUovIwM2EcLDH1nbpK3hP3fQiT1aKVfoxeNjbp106b/i9hWExq X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 742625a7-b115-433f-1b39-08d5414375c5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:CY4PR1201MB0055; X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0055; 3:G369TZuPfPQ0Bz25q4863VvQak1mLqxt51eMxYVw1eYJJRGGLELAqKqeoBgJVA9garz+JW+JHw/aJB8AWaD8ZLyljsFnpCHQkX9DKlieIWnHEmZhJJFUNS92RpRGKAwFNZfL/MRWv+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+Ol0/tXAu1eP3NRP2kcM04G/8Lrwx/rMaODbf35/zzgnb7JG+TURLoAmI7AnluVFVDkzu0ux14BDY1sihjglAYTFjl/ucXRhNj4bR2MIbhQkKKI//6iJLtP6dLLcTt5//fxa3a+Kxd3d1qMG/6fCXYrX2abe7CmUXnqLEalwA2OT7tLH50UUYXWIgnYNs6bGS7JNhymn6j4aQF36Qb+3vzT+lhE4gL3tWpFmKL4B0tdbnOP02+Ls5VbFwaB/tBvVapQSmNpQUsnXnh2YljmiZn9LGEuwKa/F8AspYoaZuEY6tBis0skK8kcDGKVIoyaIv6+Aobj43 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93003095)(10201501046)(3231023)(6055026)(6041248)(201703131423075)(201703011903075)(201702281528075)(201703061421075)(20161123558100)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(6072148)(201708071742011); SRVR:CY4PR1201MB0055; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR1201MB0055; X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0055; 4:81AQ/a9uYiAwPrZ//kiiNK/u/IDkoEap2Rs2JaQe+B7odngkECtZRY1qSI0uBBWqijN6WZBXW54c1SyOrx86Xae3rIv31e0C/uVemy3PZl+QcXGUejthxQ+xVU0b8eB/pAT7vtg2qh3t6tKTRFVgB+4RNYpMxmi8NhVP4LBFuXUNmcKomMERN0QIAUy+ZMWz29zYXNAaxhB4/Wrc0wdne3apL11rUR+25Etqc/8a2VcjnRyEeOmS+fx9HRSdgeNpNuAEZbUPogVRT9ZlMpg+Xw3FUlTxIqP7JwqL8bcnxAz+SJccFCoJtHFmMERMmjwf X-Forefront-PRVS: 051900244E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR1201MB0055; 23:q+GwcD3YjH+sykiAHFapLMQ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qOzwCtLifm5Csjg8y3Nkpuif94iPXelu?= =?us-ascii?Q?1GMYMMD0JucOfOO4Q44pmKikci9p7gW8uStDpYRX2Ww=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0055; 6:+X3dCdZZDZA0XJyIB22UImRS9TDYvOVSOvu3tgCu60tTfz5eZX8Ocb5nVadqM7QyISKP8uwS2k1goDJibciZbzRkArbtpO6DDYKu3AM1J4hm2udaV7szX9SUTD9rAbz1n5E8154qidKVAEQ6c6p4vZMjIESPDo7BC0Zhz94Vtp0jhIhWmpBCwxuCpHpHTsZa+Yd95csn9oBDswBL4EDGYVC7p/O3ykGmT2Yk0uJDGHGr80wpDSLG7SwqQScgDH93BmHqnAGTr6me3MQeDlT0+J60IXRyU9iFw1cZLdWM0tJLfv93cxmfePGABZF5ibknUDfNBKionGaitJH1T1cQpw31c4xRR6hxA4mXiY4fV6k=; 5:2yGMHiRltgnMf0H7fXt1B/a0QtEXfCK6hCUei91kDWyQDLR7YCcs3X0tmylbSXDwA5x5V0RbJ/QptNfkyUOHsk/M6/+8aQ+3IvmebrNnRONGm163G1pyk0bL2HDenTkjHvyNZg2pM99l/9vGBHhLMMQF58gp4dySkhv2sm0fm+g=; 24:I/OciSGIJWzC7UQjNoOGXWwxD+tLatt//doZW/u+GhcaCNIkS+DjdkuXX9+Ov27m2dOsP5N4rtoQarnOHDmk91AZ6YggDwf9FWlKvctB1bM=; 7:wju1mLJoruWmgkJp2ipeMp8bxtORxw0SN3TyooPq+bLoEkC67M88lu9yvRQwglpEaHJM9zF68oAWuPXbwWApLYj2K2hxRPZMze7I7L21Ven+zgNYIWBBxHCJ8Cb2CM7ZwrUS8R/S9lbGDCQlLcWufVuuBQzZYKkNhdNekEmiWLPgQaJNM+GSsDc51LlNZPVWWm6t/IhH56QJqUXOxM7v0sLEh1NVcvZ6/Jueah1fLBPLJtfjSO77oIYSqFtS+LEc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0055; 20:3qirKhi8J+NSo565GDreIiFWE/ixIx+Y+2pCsY0xhgmzoNc0J9rZG57aLSPhTYC62ojt/zynmM3fv2PMmoXJhD0qMMWqomXBMgDL6Lf3wTAVuqpDEhEPSyinqANT3+ymxjnZVgoQ7lzEulyLKYuREB37Kli3M96LTUIb0drLOOIc7Py0pd01UTl2OgCvzHh8o0zWsR6P2Ds9YbBehvi3JoksGOzYQXftaPs0yqCj4FgQFwi0QGuJy+TFYrhmhlNR X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 09:33:53.6009 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 742625a7-b115-433f-1b39-08d5414375c5 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: CY4PR1201MB0055 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 on_alloc_stage: is this operation on allocation stage resv: reservation bo used of this operation Change-Id: I01ea482e8c7470014196eb218e2ff8913306eef0 Signed-off-by: Roger He --- include/drm/ttm/ttm_bo_api.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 368eb02..25de597 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h @@ -263,6 +263,8 @@ struct ttm_bo_kmap_obj { * * @interruptible: Sleep interruptible if sleeping. * @no_wait_gpu: Return immediately if the GPU is busy. + * @on_alloc_stage: is this operation on allocation stage + * @resv: resvation bo used * * Context for TTM operations like changing buffer placement or general memory * allocation. @@ -270,6 +272,8 @@ struct ttm_bo_kmap_obj { struct ttm_operation_ctx { bool interruptible; bool no_wait_gpu; + bool on_alloc_stage; + struct reservation_object *resv; uint64_t bytes_moved; };