Message ID | 1533102573-15365-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 4886B15E9 for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 1 Aug 2018 05:49:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39E652AE05 for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 1 Aug 2018 05:49:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DB122AE4D; Wed, 1 Aug 2018 05:49: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=-5.2 required=2.0 tests=BAD_ENC_HEADER,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 D9E0C2AE05 for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 1 Aug 2018 05:49:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44E536E3F7; Wed, 1 Aug 2018 05:49:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0045.outbound.protection.outlook.com [104.47.34.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9142E6E3F7; Wed, 1 Aug 2018 05:49:52 +0000 (UTC) Received: from MWHPR1201CA0001.namprd12.prod.outlook.com (2603:10b6:301:4a::11) by DM5PR1201MB0235.namprd12.prod.outlook.com (2603:10b6:4:56::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.995.19; Wed, 1 Aug 2018 05:49:51 +0000 Received: from CO1NAM03FT005.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::206) by MWHPR1201CA0001.outlook.office365.com (2603:10b6:301:4a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.995.17 via Frontend Transport; Wed, 1 Aug 2018 05:49:50 +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 CO1NAM03FT005.mail.protection.outlook.com (10.152.80.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.1038.3 via Frontend Transport; Wed, 1 Aug 2018 05:49:50 +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, 1 Aug 2018 00:49:48 -0500 From: Huang Rui <ray.huang@amd.com> To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org> Subject: [PATCH 2/3] drm/ttm: Add ttm_set_pages_wc and ttm_set_pages_uc helper Date: Wed, 1 Aug 2018 13:49:32 +0800 Message-ID: <1533102573-15365-2-git-send-email-ray.huang@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533102573-15365-1-git-send-email-ray.huang@amd.com> References: <1533102573-15365-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)(39860400002)(346002)(396003)(2980300002)(428003)(199004)(189003)(26005)(486006)(446003)(48376002)(426003)(77096007)(51416003)(186003)(336012)(50466002)(5660300001)(2616005)(126002)(476003)(2906002)(7696005)(11346002)(104016004)(97736004)(76176011)(316002)(72206003)(305945005)(86362001)(50226002)(356003)(81166006)(47776003)(81156014)(478600001)(6666003)(8676002)(16586007)(4326008)(450100002)(106466001)(110136005)(8936002)(36756003)(53416004)(105586002)(53936002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0235; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT005; 1:amkUeXQ35iZUxugXo3Kx/4KnXTA3Y1iSvhJYa9/K7gPuFUOymOYthW1N9Gsx7wwzuqDzA7JPsLEKf+jMMZLI/UQgMxe6SLCppF+NLG2Y2CQ11ekNAGY5eoI/sJqBVmGk X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59357368-276e-43bc-92c4-08d5f77298f2 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060); SRVR:DM5PR1201MB0235; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0235; 3:DQJlvrniFlJtKA/05IPoJ3i8b92DofKZxcgikBOBlPpHWRK7bm4rsI+cunC58QkPXBTYdgZReqrwqyhfstpoixbBTlYIqs63u892VCDPDmyBm2DsuX2eHGxh9t7VQOXb/4F3P3RMfIDdpFQasIxi3i8IdxOFH7UO38RpL+ew4ZQmhUC5r3wCbHsCBu83RCeMHhpy8W7kufDuRaCyUpWBY5Ag8VHhs9SwF32VVe6k2dS4v9KAjLK+r5vexbTgbGRbgmRjGK7q0mCt6y1Dm3TdouJ7CT8BimdAR74by8BNoKL9FRI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ng06edmJEgPtkIR3SG73xTL74aPd7W9ZuQps+egs5Bd/Q4vD3XAmRSDFvmDh1iciIl96cVb7aEE4fA+AEeJiNeuPkookgswLtPGzFhMUPDnRbnL26ICaIl8vZeGHVi3Fo4N3rYtUar+NhtrYeMErDZu2V/ytf3KUMMgvcy X-Microsoft-Antispam-PRVS: <DM5PR1201MB0235417D8F3D9BBC7D8FB227EC2D0@DM5PR1201MB0235.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)(10201501046)(3231311)(944501410)(52105095)(3002001)(93006095)(93003095)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DM5PR1201MB0235; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1201MB0235; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0235; 4:R3CEmlAg5SMDqsSdSCgET/yVoE++sqvGLMObhk727LAkhhEcSmDOoTV6UO4VZummbeiiDbz5yWjqeQ6/eDZxN6f64todDPPnx1NRGhTnOBZcbNPtwlC22X79yFcmUnFGlgW1VQFDrEi0C+b/cY48IjRC8F+85PWmq/V8BLo9+KOB3+IuexVgyQCLUK1YRikW7AxenK4evBUVGvfIr/fRkhtSSKAssXXvhFdF9njaqZqtSyDyBr7NzWOcXrG872r1HHRUz3SYPwY9F16IXzS293Gu0oK+iTp68xsOiXDQ2xzce1TSKXl0gY1DL4xFv0uL X-Forefront-PRVS: 0751474A44 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR1201MB0235; 23:XKQv9a8nCtV5uN0Gx6DH6aVT1/hrXk28zIrD0ix?= kec4RZc2p6NpFa+jpr89rMVxqesdr8w04rUA89tEPQ3i0bgUATXI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HvyhcOaj+i0g3taMiEq5A7IoJLG2dEBWzDY29o9u2IL4kENAMAg++YRG9Mc6uSxjOvdE5cotkQeyVKojvGhoJkMCSEuE6ByWOSCB/5/B3nSL5VOHPK/dKQfW6yXGFK0qI4o40pMxIoCPomD7YNisfWkyiYCmUmNzRF5xoni2pxja/gWmRoOZSx4qHo7nM9po8pnN6FWpdb1rpkMRK7WHF4kiWfRWfOr9mhEvQ1LckNKU5dyZPWtWBxA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0235; 20:tgDopUSDc/QWqzad96TB1rMUpcrRgyqkUGzK5O1LuKA+zTWOa/BAkCKDMai5ymXyKzwFxgpZv97gjdB8PGUYHUAeY1HgTUKJMmGrgqXdxpdzeS4nW9RzaRjyJ6B01A4GfbcFe0WvkbEGiKfaokwrUcxpus2q9bjAAmzH5utqoX34AL59J1LBhCZaPJmvCkQa1ydlAL4KY5bNnrvva/XYKKRqqiPc3P5PfSdHR6t6inqcD4n4lVxY/N96JhYuyaBE X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2018 05:49:50.4191 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59357368-276e-43bc-92c4-08d5f77298f2 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: DM5PR1201MB0235 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> 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 |
[1/3] drm/ttm: fix missed conversion of set_pages_array_uc
|
expand
|
diff --git a/include/drm/ttm/ttm_set_memory.h b/include/drm/ttm/ttm_set_memory.h index a70723c..7c492b4 100644 --- a/include/drm/ttm/ttm_set_memory.h +++ b/include/drm/ttm/ttm_set_memory.h @@ -57,6 +57,18 @@ static inline int ttm_set_pages_wb(struct page *page, int numpages) return set_pages_wb(page, numpages); } +static inline int ttm_set_pages_wc(struct page *page, int numpages) +{ + unsigned long addr = (unsigned long)page_address(page); + + return set_memory_wc(addr, numpages); +} + +static inline int ttm_set_pages_uc(struct page *page, int numpages) +{ + return set_pages_uc(page, numpages); +} + #else /* for CONFIG_X86 */ #if IS_ENABLED(CONFIG_AGP) @@ -123,6 +135,16 @@ static inline int ttm_set_pages_wb(struct page *page, int numpages) #endif /* for CONFIG_AGP */ +static inline int ttm_set_pages_wc(struct page *page, int numpages) +{ + return 0; +} + +static inline int ttm_set_pages_uc(struct page *page, int numpages) +{ + return 0; +} + #endif /* for CONFIG_X86 */ #endif
These two helpers will be used on set page caching. Signed-off-by: Huang Rui <ray.huang@amd.com> --- include/drm/ttm/ttm_set_memory.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)