Message ID | 1534500481-15123-2-git-send-email-ray.huang@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 17C211575 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 17 Aug 2018 10:08:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 066262AFC1 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 17 Aug 2018 10:08:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE8CC2AFD2; Fri, 17 Aug 2018 10:08:27 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 635512AFC1 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 17 Aug 2018 10:08:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CA6B6E5F3; Fri, 17 Aug 2018 10:08:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-eopbgr710054.outbound.protection.outlook.com [40.107.71.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6D9A6E5F3; Fri, 17 Aug 2018 10:08:25 +0000 (UTC) Received: from SN1PR12CA0013.namprd12.prod.outlook.com (2a01:111:e400:5174::23) by MWHPR1201MB0128.namprd12.prod.outlook.com (2603:10b6:301:55::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.21; Fri, 17 Aug 2018 10:08:24 +0000 Received: from DM3NAM03FT006.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::209) by SN1PR12CA0013.outlook.office365.com (2a01:111:e400:5174::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1059.20 via Frontend Transport; Fri, 17 Aug 2018 10:08:23 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by DM3NAM03FT006.mail.protection.outlook.com (10.152.82.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.1059.14 via Frontend Transport; Fri, 17 Aug 2018 10:08:23 +0000 Received: from hr-intel.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.389.1; Fri, 17 Aug 2018 05:08:22 -0500 From: Huang Rui <ray.huang@amd.com> To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org> Subject: [PATCH v4 1/5] drm/ttm: add helper structures for bulk moves on lru list Date: Fri, 17 Aug 2018 18:07:57 +0800 Message-ID: <1534500481-15123-2-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534500481-15123-1-git-send-email-ray.huang@amd.com> References: <1534500481-15123-1-git-send-email-ray.huang@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)(136003)(376002)(396003)(346002)(39860400002)(2980300002)(428003)(199004)(189003)(486006)(8936002)(86362001)(11346002)(2616005)(126002)(104016004)(76176011)(106466001)(336012)(110136005)(54906003)(356003)(2906002)(305945005)(36756003)(2870700001)(97736004)(450100002)(186003)(316002)(4326008)(7696005)(23676004)(77096007)(476003)(426003)(446003)(26005)(50226002)(478600001)(68736007)(5820100001)(50466002)(47776003)(8676002)(81156014)(5660300001)(81166006)(53416004)(72206003)(105586002)(6666003)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR1201MB0128; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT006; 1:zjrSA4+/VcxaCMTkklKa3HrYFCG4PoaRGGLFpUyoc7uDF6T6kd1hL6Kpm5tQQxkB94W1+K6HOXqgSnRz2Nx9FOEku1RITo6MeR3569ybIGBBlJ1iMHB/20rxXQOq1Swn X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 69b322e5-b878-4705-94a8-08d604295e40 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060); SRVR:MWHPR1201MB0128; X-Microsoft-Exchange-Diagnostics: 1; MWHPR1201MB0128; 3:7RvB91IBcQRAQWQbsnE5aq26M5TheGaXipxHHhtQXOIfNxpZuY9L6dsPgrZDG7cCOXwg7tkbUKms/h5EJKVYvMhEkLvelIhHPdIsLNbp2ZI3SzsgJoDdKB5Kw3ZvKCQVAQVURXUctpUFDxbitzzOKA7S8c9YYju4tM3OCv5E0M2wmliSPJgztSmeGdsPn0SRRmdvVkAOnHiqNn53NQ7H2NHG46pO2wz/X3y22hcTFrQqD3Mz5H/KUyMgDe04ouQ8Cf1byBIyts2un/k38GIk0osp2RMDrsl3DJqKF+PC7tY2do7ZbwGPhE7fxv6ZthF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BFez2IK0aM6m+CUF1KBVzbdnPayEeZTnlWw+Z2OdDpuKNK4JUlIdztpVN//ALwIDAK1H4K4arT4AmSTNSGhMC4mddC5ZILHb7MAa1PtFL3Fe8lSX8myF4X0J157DyckxKNvxI X-Microsoft-Antispam-PRVS: <MWHPR1201MB012886EAEA3B88FD1E1AD069EC3D0@MWHPR1201MB0128.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(93006095)(93003095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699016); SRVR:MWHPR1201MB0128; BCL:0; PCL:0; RULEID:; SRVR:MWHPR1201MB0128; X-Microsoft-Exchange-Diagnostics: 1; MWHPR1201MB0128; 4:g3RRCVldQ8SjJc24wsw1fOQVB7Qox8BT8OwfEPvlNc78TzWsU6RKJON6Oxk/n5CnqeH/7tYbeIP9Q4QWRRaP8G3BaPQWbN+XeSGlvQWOPXytxxUf9BtaIzj6S4g+fDxF0mAVe/6yKcwscSg0aFJuQsm/hbEop64ZEPzg1kFafPMCaKyVD2aypfMNOGmGfEDfTZ0P25S+5wfKUaeCgkG5qNk8YkAAU8inY3Cp25SQkG7e1ZpNIzM13L2pYfUY6PqVMq/KsPe2GaGLE/6f1TxTlPD/+ldqeClsWw8M+S2exicSf0LxxJQ2N6BExSM1YRtR X-Forefront-PRVS: 076777155F X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BMWHPR1201MB0128=3B23=3AUO337?= =?utf-8?q?8FQZz1JeDZnabYnB3nC7OhPbLjsSi7fcwxfywXmPPtpvapdazexK0PEk412OlmGi2?= =?utf-8?q?wT/Xk7Ft3VtRcd/4LC0wqPrH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oVsg34RdS8yynYFW0LkUaLf15OpS5Afo8//OuNwF8TVFhfKeDnCup0Ipk7T0/ng==; 5:M20VlZxrc0kEMDozdecy1ZIu4leyW+H5lVtgrAT8jGIXCYcCqYSenojJadOtKcWyOzVwTCuXSkE7eH1Df6g73mJibkVUxXjWArgTizXdkfLWqy31akJIdwpUAFa7OVWMtlC+9pTBJ0+8VD6R+e+096RIEx4Tm+Zw6zN58u0YV9I=; 7:mcC41VbMechm8fI4iDbCWz8AenvblJo+mo565Yp11Nys0vvsGBig3nbNVBKhwyNJET/4hDfhlxk/F2Z7yjk+V2N1yJJctbgi0gZfVe0+hwuZ6XuAJBM1teWNPXHVbRAv3bfMb8m+KCdyFBWd6eak7IsZeEWjbzGW+gfchLHxW2LkE29EozmpOvBBviRuTPJ359cXkBSBZKvAu4F1YzrR1zbFs55Bwjgz18Ayl9xArELOYSyIhgWKqrGsHhdDAQ/y SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR1201MB0128; 20:BQFD2XfCqAQ4SXEiU6r4iM57bcEeeM3Jh50SsxRGgM66BGU50BQ4lD2JTYzXoJH2VqZlFt5ymrLSHANHy8ikWPZJjOeQ6D+TIlomp8woh/Bayjfo23kRW7KRcrJTMfIe0oTl9u8V6cl9mp2kOoBj37WaRPzzMGgnhwUNA/P4LnK1OlqDlJnCj+Cqc35MEuKhXGHgNb/LYDe2WBqQKMZl+P51gyK2KUgDp2IKH/Li0bkz1+SLxcudaBxULdOZcW5/ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2018 10:08:23.9246 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 69b322e5-b878-4705-94a8-08d604295e40 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: MWHPR1201MB0128 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Huang Rui <ray.huang@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
drm/ttm,amdgpu: Introduce LRU bulk move functionality
|
expand
|
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 3234cc3..e4fee8e 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -491,6 +491,34 @@ struct ttm_bo_device { }; /** + * struct ttm_lru_bulk_move_pos + * + * @first: first BO in the bulk move range + * @last: last BO in the bulk move range + * + * Positions for a lru bulk move. + */ +struct ttm_lru_bulk_move_pos { + struct ttm_buffer_object *first; + struct ttm_buffer_object *last; +}; + +/** + * struct ttm_lru_bulk_move + * + * @tt: first/last lru entry for BOs in the TT domain + * @vram: first/last lru entry for BOs in the VRAM domain + * @swap: first/last lru entry for BOs on the swap list + * + * Helper structure for bulk moves on the LRU list. + */ +struct ttm_lru_bulk_move { + struct ttm_lru_bulk_move_pos tt[TTM_MAX_BO_PRIORITY]; + struct ttm_lru_bulk_move_pos vram[TTM_MAX_BO_PRIORITY]; + struct ttm_lru_bulk_move_pos swap[TTM_MAX_BO_PRIORITY]; +}; + +/** * ttm_flag_masked * * @old: Pointer to the result and original value.