Message ID | 1534924375-5837-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 8B241921 for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 22 Aug 2018 07:53:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EBE72A52C for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 22 Aug 2018 07:53:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 701D92A28F; Wed, 22 Aug 2018 07:53:58 +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 08AD62A28F for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 22 Aug 2018 07:53:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F3950899B5; Wed, 22 Aug 2018 07:53:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680040.outbound.protection.outlook.com [40.107.68.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id 05E2C899B5; Wed, 22 Aug 2018 07:53:56 +0000 (UTC) Received: from DM3PR12CA0085.namprd12.prod.outlook.com (2603:10b6:0:57::29) by DM5PR1201MB2505.namprd12.prod.outlook.com (2603:10b6:3:e9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.14; Wed, 22 Aug 2018 07:53:54 +0000 Received: from DM3NAM03FT065.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::203) by DM3PR12CA0085.outlook.office365.com (2603:10b6:0:57::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1080.14 via Frontend Transport; Wed, 22 Aug 2018 07:53:53 +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 DM3NAM03FT065.mail.protection.outlook.com (10.152.82.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.1080.9 via Frontend Transport; Wed, 22 Aug 2018 07:53:53 +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; Wed, 22 Aug 2018 02:53:52 -0500 From: Huang Rui <ray.huang@amd.com> To: <dri-devel@lists.freedesktop.org>, <amd-gfx@lists.freedesktop.org> Subject: [PATCH v5 1/5] drm/ttm: add helper structures for bulk moves on lru list Date: Wed, 22 Aug 2018 15:52:51 +0800 Message-ID: <1534924375-5837-2-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534924375-5837-1-git-send-email-ray.huang@amd.com> References: <1534924375-5837-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)(376002)(136003)(396003)(39860400002)(346002)(2980300002)(428003)(189003)(199004)(72206003)(104016004)(450100002)(97736004)(36756003)(4326008)(50466002)(77096007)(186003)(2906002)(426003)(126002)(336012)(446003)(11346002)(68736007)(476003)(2616005)(486006)(478600001)(5820100001)(50226002)(2870700001)(106466001)(105586002)(26005)(53416004)(81166006)(8936002)(47776003)(7696005)(8676002)(54906003)(81156014)(76176011)(316002)(53936002)(86362001)(356003)(305945005)(5660300001)(23676004)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB2505; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT065; 1:JRBWN6K64GlO/pT0zgMmVxHVsaam/3fuEGWMuPlAWBsQMEqQk14CLJI65OYOwTZokvAEHA+j0miiC2rR+R8QDqjckfAD1fbfy4tfBHp6MToGNxB6OXfe4BwgzTXchtVD X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e92e6786-b098-4a8a-7185-08d608046810 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060); SRVR:DM5PR1201MB2505; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB2505; 3:MwHBBdlCB//MhZCBo1DFYPKaynZDepcDA0pCvbAYhdgm8bg5fkEc6rcoqrEJI8VQ4ZtwVMPmUpBuA6JwYpcNpPWJ9EWd8L4/zg1Qu+ITNzwGMTQImQSPawzRgybnt/yOzZuBmIdUdtYFXguKHuC+FR4E2uVIYVGz8jheQVML8bfog28ZICPSgM0Iw4r85dezTJxBfI3v1+zkmP8L11h+FnHK3z8qBv3jEjJ0bY8YyVkmPAlqqUe+7GnohUQ3DO5IMNjfJrCbAeRFpIs/HaMvdUHEUYg7A/VC5twVRmdK7wCaA7PsOPaMmawHXa2risK9HCnpOcLi0t4+PJ3UI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3PWfmdw7iA3KRQDL/QyRJCj62h+IcGLkS9Kyyq4gIr1bJSirGb6YHmd30W1viIHoAnPE/RdZpUJSykPryEKTA0/JmVD99dFsGsLVVMkzF1KEtmsStLP94H X-Microsoft-Antispam-PRVS: <DM5PR1201MB25051A48407DB4242F53253FEC300@DM5PR1201MB2505.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)(5005006)(8121501046)(93006095)(93003095)(3002001)(10201501046)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:DM5PR1201MB2505; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1201MB2505; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB2505; 4:ofVv5N+qfYN0NzHG1pD8D4/De3bxkY2vBWSdIKJkq5yK9umknXAQ6CKOg4EN7k7xSVwk5tbrU14qxpAiPVPWInfF4NgdKybQUq1sg0IgYBl5zQwobnLCLVx/Fo66JRxCOu5ZZ8FuJn/owylEVqjkDzEb9EZFIZvbVEYDY2T0O5HbfdKNczwDsBCLEySP3cb0kTcbnjb/OFw6O3PAs13JsYcaebkVAV+X2TC3qE334h6nclFQUcUMTpQDWnQB7avYGBsFCWfEzgPaBzW5TCmzMR5NeMkd4m7gzb0ZxVWmmgYktG6VtZwDFm5jOXcMM4Q4 X-Forefront-PRVS: 0772E5DAD5 X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BDM5PR1201MB2505=3B23=3AeN12l?= =?utf-8?q?w9IY1M2kCjL0EOiVOsbozQxnPiBPQz7Jrvjv+hpHQUMzH1Gipw6yA8K0P1dT+qX/9?= =?utf-8?q?xviKZ/iKGK07i4NnQZ3fpEOOn7olouEryjNuRRv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KzNuFA==; 5:l8u8k2ry4Nciemoj1/EvHeweTTqNc4raR2qeCJ3d9ykeRpPukXUWNs2AuDSFzg0WI5xfxL92egnaBCxt1ikcypGi6ZVGBZzUcUz5f3LZQ35GbUy4P8q9xj4vKUgvs2pr7IMFsD1Opk7ngIVGfzBUMfaDSrHXQX2J1CDW62kYGjM=; 7:Shh9+7h7dje6500RxGHhdx0vnuhLTA1MftOS/FCEItb1klmSHbGLtadyYMmbP12WfdUlrWrtWsWLsQp18A1hEb1i9hXZfkBM/egkhw0pUq5pil2FjTreTcEsl/kfJlWnDMYQMLVHwg4ZAMBgZq4hnX2cD9iBdiozkd/AhGh3fWIYGk2PfI+5g6Tdazjr3NCYTSCrdarJV9vxLaqjOl2oWE58uiD0eug9y7vYnJuxyDsJJBPBmBEpNOEJoj4U9Bbl SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB2505; 20:yph6uVTyX7T9gNQ8Nyo/8snfdjihSAxKBiSuK0zI7pTHt6HCSbpURgwjQazP4m+Ian3BGewD+4yYEHvexYiS3Yko+CjkwxMrfSjDhBjYVolPTQ9ObCSrDqz7sc89JuNHMvn+iNV9U9twNzG/K9tXdifTIWOkbeqljlFMIYJoxqpfDFyfGsjJKW/D61hRLH5CDnpUDQ79ihuL6EZgVTdFwJDkInB4nPXOwi4GpMbNm5HRaQLRPcYwqcMP2alwWsfb X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2018 07:53:53.6584 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e92e6786-b098-4a8a-7185-08d608046810 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: DM5PR1201MB2505 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.