From patchwork Wed Nov 22 11:44:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "He, Hongbo" X-Patchwork-Id: 10070309 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 ABF42601D5 for ; Wed, 22 Nov 2017 11:44:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B2D229581 for ; Wed, 22 Nov 2017 11:44:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9004929BF6; Wed, 22 Nov 2017 11:44:41 +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 44039297AE for ; Wed, 22 Nov 2017 11:44:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 84B006E62D; Wed, 22 Nov 2017 11:44:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 3013 seconds by postgrey-1.35 at gabe; Wed, 22 Nov 2017 11:44:38 UTC 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 307866E62D; Wed, 22 Nov 2017 11:44:38 +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=7gyqXvLgNEwXI5jYQ71J/zLZ9F6Vsw78mWJhyEQnaGU=; b=qJvjiAr7Fj/DsDuZkjSc9Pyx01qwYmFq7oevkJgzjett8uYpS/Rxu8JGR+y59rEPKNaPTLIdmHi2HzjKAbCU2BN6n14lqAnxhe0CAw4J7WbcSPfO//Qxi4btUNIEqMm7wch3JpTbPOW0rdwL7P1KpZQ7SmjsavH3gjyvzuko5Fc= Received: from MWHPR12CA0036.namprd12.prod.outlook.com (10.172.49.22) by DM5PR12MB1452.namprd12.prod.outlook.com (10.172.38.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Wed, 22 Nov 2017 11:44:36 +0000 Received: from CO1NAM03FT038.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::205) by MWHPR12CA0036.outlook.office365.com (2603:10b6:301:2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.239.5 via Frontend Transport; Wed, 22 Nov 2017 11:44:35 +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 SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT038.mail.protection.outlook.com (10.152.81.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.239.4 via Frontend Transport; Wed, 22 Nov 2017 11:44:35 +0000 Received: from roger-build-server.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.361.1; Wed, 22 Nov 2017 05:44:34 -0600 From: Roger He To: , Subject: [PATCH 1/3] drm/ttm: add set_pages_wb for handling page order more than zero Date: Wed, 22 Nov 2017 19:44:27 +0800 Message-ID: <1511351069-4757-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)(6009001)(346002)(376002)(39860400002)(2980300002)(428002)(199003)(189002)(305945005)(101416001)(356003)(86362001)(8936002)(81156014)(81166006)(50986999)(50466002)(8676002)(48376002)(105586002)(50226002)(72206003)(106466001)(478600001)(68736007)(5003940100001)(53936002)(47776003)(104016004)(6666003)(97736004)(189998001)(53416004)(450100002)(5660300001)(36756003)(4326008)(2906002)(16586007)(110136005)(316002)(77096006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1452; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT038; 1:0PKLrPpNFWYTuL7tBKdTOI/+b4IddMlwW3BQYTV6TBl+1HA9MjEHB4RMgWYNHnuV7X4mLRjN1OdzOnTeo3ZpVq3g012BTo+1Q6/AeqT7+Wvm4mJjs257bXQ6JQjz7TY4 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6598a372-01ed-401b-81a2-08d5319e67f3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600022)(4604075)(2017052603258); SRVR:DM5PR12MB1452; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1452; 3:EtLDWeuqIrzyZN5237WFG0P556qix6s7HCLFO1pi65qxm+RlyY2p8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05BJ4Lunhj9u/3r4fhAUTkFEouLBQDCxDuTbg8x4Jm7VARYBQsWrUd11g2WRPx6dFqvp+5pC5k1c7Xgy8heP8Zwr6zn4aQ9z/6KQXNnZZP3thZ/1+5Q7wp6otwnXqZhqEz01rJii8DQ10uUrMI1ENA4x1LAn8c/XU+r45aadJgusPRDOctI2I0LN9+CrrZtdEtfoTa2Sc4IeQQMlrN1VEVVpXZ5DbKlph1MW2dDovn+KKFwzxaWMEZHZPBSKxLi1kPzzU/41J7Hvv10BpkDPl4xNdM08v5YlK8tvjkDQKgx1iprAmMvpOOv24nlJmWeLflSTLRK/PRPVRznIznvK6/PvMl96KjSwuHJDeczQdTGfPwP/1OD565+ZVGNq3igmGCRJRo/EDwa2zIaFXVv3fJ215DcxmmqCsVuCv9hjzRUQAw X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93003095)(3231022)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123564025)(20161123558100)(20161123555025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR12MB1452; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR12MB1452; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1452; 4:EprH0esgC5496ab93jg7K3K4gHj+rlhFAU1GG0+65a4tZ/ef4b4oGbuSWWkasMyqikxv1/X3ALmeVF2XauViERfNbm9F26iGYGMDTT7XOKu/Azoi52JltbHpPE/J6GRlBOVfwTiYkUJgRXtpSakC4A46ZRz8Q5EefXLI3PSSTu+iX2CnEs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TVE4=; 7:hqX4JImrO4xl9V26bVFROuDv/C4CsZhOzJegO/Rs6nGaFT2WCwL1TBBPC6j+LZvW9/rEEK/CdGQYbetesZcHS8AyzuweoXygkm8PHwgcD9eKzy11hJxuVO8nSl8zQUtryvEvYEi9GwHLrHQ0sHTkqc87xsAqsnSdh5CqU8zFIijh9vw6RRl4IsIBJSpJlf5Bzlubi8rgrid+5VVkCShHHD9itn9GnqvJA180RRbFE3qx9djpRz6gxZOR5Pxdn8DC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1452; 20:jdL08mHDVgRia7x3U5HjjqMMju+AySHm1lo7GEmzHrcqqa+i5S+80jPecwgg9KvfFyXuOvvN1IwFMdBwOep3kUH99bZFTEtzPubpvQWpGrVRUinH0ag4MVNQe0IDFXXyg76p1ngPd6En1Qk4B9eCe8nLJ4UKYo3ISvFwwOy/Yh4dMkMv+kGJD83pGIq00gorb3kX6b4OfF8iKgJWLY+TfuIGIxGdTQqYFtnu7cAC91zsuXX6XD5CEw/RJBdKWp2b X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2017 11:44:35.9523 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6598a372-01ed-401b-81a2-08d5319e67f3 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=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1452 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: Idf5ccb579d264b343199d8b8344bddeec2c0019f Signed-off-by: Roger He Reviewed-by: Christian König for the whole --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index a8b2bfa..cdbb731 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -223,6 +223,17 @@ static struct kobj_type ttm_pool_kobj_type = { static struct ttm_pool_manager *_manager; #ifndef CONFIG_X86 +static int set_pages_wb(struct page *page, int numpages) +{ +#if IS_ENABLED(CONFIG_AGP) + int i; + + for (i = 0; i < numpages; i++) + unmap_page_from_agp(page++); +#endif + return 0; +} + static int set_pages_array_wb(struct page **pages, int addrinarray) { #if IS_ENABLED(CONFIG_AGP)