Message ID | 20180126182911.20761-7-tom.stdenis@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.web.codeaurora.org (Postfix) with ESMTP id 6E6AC60383 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 26 Jan 2018 18:30:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 604F5297F7 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 26 Jan 2018 18:30:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54BFB29BC8; Fri, 26 Jan 2018 18:30:15 +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=-2.6 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, 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 DD5E7297F7 for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 26 Jan 2018 18:30:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 74A826E5C0; Fri, 26 Jan 2018 18:29:55 +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-by2nam01on0040.outbound.protection.outlook.com [104.47.34.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id CE2E86E653; Fri, 26 Jan 2018 18:29:30 +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=WzlbELTbFTOAJ8/S8YNteByWVXZXxMsp0iKAy6VqM+Y=; b=RlHrK/e+wClOfPHXAwavClCji5cIPo6Q9MePsYwJAitAFdwrSyg2CXWT5FJj9keX9F3yhS5VBl/1V1PQzHHixBbA9tzx7IyFEE2OJqWtvEeTZ8UuY0OZ9hbv+/JCOG+ILMqT7ibmtB5+b0teWV215HxAzbOnL/28k5WYDdOSN+o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Tom.StDenis@amd.com; Received: from fx8.amd.com (165.204.55.251) by DM5PR1201MB0076.namprd12.prod.outlook.com (10.174.106.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Fri, 26 Jan 2018 18:29:29 +0000 From: Tom St Denis <tom.stdenis@amd.com> To: amd-gfx@lists.freedesktop.org Subject: [PATCH 06/12] drm/ttm: Simplify ttm_dma_page_put() Date: Fri, 26 Jan 2018 13:29:05 -0500 Message-Id: <20180126182911.20761-7-tom.stdenis@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180126182911.20761-1-tom.stdenis@amd.com> References: <20180126182911.20761-1-tom.stdenis@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: MWHPR03CA0027.namprd03.prod.outlook.com (10.174.173.144) To DM5PR1201MB0076.namprd12.prod.outlook.com (10.174.106.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f2f24243-26ef-4f2f-0984-08d564eabd22 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM5PR1201MB0076; X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0076; 3:sJ+Bcxg20Wjtc3dItYntZHk4Y6YaAdl1kZS/ZASx+uXVCi5h20YnF09dbSEGg+mz7Hxq52yARkD7prjSZDLbTihCNm/a457WsLncMxAf0iMPFVqn+zO1QMZx5S9VHj7q39/RFwC6EJtEGxGtP7ruTAKKjVXrOEqIyvpt9i9z4wBkNo5JFuF1NCO2+0oCKpF1v/Cbjs72K+wvZM2CDqjokvxhsKc4IyOeC/ODC7Rtz8yPzh+MtYkQCRm4aKrQyBfS; 25:J0pf30q3e8+ah1XvfYY9zbt+QOmP00/SiDmIqyjfbtwHwCFbIByElRl+oSiO2WjdBO7JEVsmIU1i4H3LQ9TFWaQE/h361m4L1uOL3EwzjYFAbTGBPiVAkUhABTf41WNnGJJBw7Q2YmEQfIhZR2ZiOIbMMXksHUd6ypld22/MLwHTZqy0DbrcnDdAksMYZXN9RaatiXrm/80kBUBpBGlDXkF1MfQjnzYPZMKAnJSEi+EJuhBlO0D47pRvl8qg3MafqAIWRUL18V/ifPYptl4+tw9/MIBVx3Ad3Y+Csxf0ACDY95idD2T1lS/uUzV4t3kSM2F1kQosarJq1ZTJ483dLQ==; 31:MF3Ths4MZr11/89T1U+LBiKK/ZWt34p22EL836HgUaJe5IZXeszlFCDA272xTj6n/553fEFK6jd8ODYFNmnU1T6K2/sj8pqH0cb5thRQKm6PrEbWYwqj76XJAQ3hZLsnSnTrTNRlp/KJI3Van74r/+QZQE7K2sgdBjJLx/XsQrpXjRKlXE5RX79FYHQlF2lbP6KTJPcKlwCh5jQC8uNwoRSTc5zqZXatJyO1PIfE/a4= X-MS-TrafficTypeDiagnostic: DM5PR1201MB0076: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0076; 20:iPhnqjWXege+ZFH/OWd0RqWoULLwEcITHhi/0JcEb/HxAO1Ci1fSFEJoCPJ6BsTd8dbnsEi8kfz++UDWFCEeItrLj3jQQdKBaE67wgtOnz2wW7T8YxZtfFCd/NNjL9G+VmQMcSXi86uHexa3ynkS1NNe8/vYMK9EDQUkIcqvd54GCqlbDMqQ+7lGhtc4VqcPh4hegzMWTAPXuJymh+dr9IFjOJ/uiPqL5VprX3LMJs9neE1ErPRQeAwXti473IP0utpkgIoKawxraxkWtE5Ehc7KxSJS6vzBq9+BL0oMEvchOp7pBK77N/I1w1U0rvLlsYZUVXv2GJ4rzHjnLn+MRYedshfwlf3MKrja/0mCWi9UWoH6rXFPzbYEEI+bn7fL5Sp9VL2ekv9QMckvObSrV6BDeeiPe4Xd34rwmYHcTOTD/txQzJk+o9t633apm/2rfo2K3OLFs7nnH5PgkeN7LaS9GvTH1YjqosW8nTQZ42H7Prh3r+kuKEQsp93h4k8n; 4:FYubqiRWFBmZngkwr4c3bSleoPPrpDk/XR7QCj2dDH3+BUKMDUqRArsAG4AkADd1gyLRoheKM9e5yhXRK0V7jR8aZmlc+9H9rMS2hQhpOT+y+q/77ggKeelBhmqhoCMQutf5AAMPgiie75IrWaJf/nYAtPpXVeblPfUOM+9oaIYpx3QlgjyRVNQkdfzUJbakJipqqXBTIQFWswN9tCuJclzOyMuxQA68Kfqzz6fnYEiR7kmlYQ75azNHU4HSSpNYPhnA3rjbFu8a1JtqDxn0acHL5wa7FAi4xqHDRY7gvekZaWjGGBLWn2feNZbP/8xV X-Microsoft-Antispam-PRVS: <DM5PR1201MB0076CCCCB51082B996579A77F7E00@DM5PR1201MB0076.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231075)(2400081)(944501161)(93006095)(93001095)(6055026)(6041288)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR1201MB0076; BCL:0; PCL:0; RULEID:; SRVR:DM5PR1201MB0076; X-Forefront-PRVS: 05641FD966 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(376002)(396003)(39380400002)(346002)(199004)(189003)(6916009)(2950100002)(6666003)(7736002)(305945005)(5660300001)(1076002)(6486002)(6116002)(3846002)(53936002)(86362001)(51416003)(16526019)(81156014)(7696005)(52116002)(186003)(26005)(8676002)(97736004)(386003)(50226002)(53416004)(76176011)(8936002)(81166006)(25786009)(36756003)(316002)(478600001)(72206003)(47776003)(50466002)(68736007)(16586007)(48376002)(450100002)(66066001)(4326008)(2361001)(106356001)(105586002)(2906002)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR1201MB0076; H:fx8.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR1201MB0076; 23:XayRiI7cH2Fw2KfxIejDfs9sVymR2FUXXeu8MqW?= =?us-ascii?Q?7mOirCYE8Vh0FziNj7u7KqljW54P9PMJcdquJoVxzqnLLBK8t0oWYzDUR04d?= =?us-ascii?Q?poXeP/nyJznx6C9lGhe4Mp5WnbElHlFJuxyr7g89D9MM9TcmH/jCKT8LOGu8?= =?us-ascii?Q?4ZBSTtJMLgWXmDO1TAPuaQJeaOs3bLejtpR8+4St6l7aC2dBafkY4cZ1rrGj?= =?us-ascii?Q?+IILgRWPTpbhVe6xO5fx4k3JtG77uAA6CpqiCYTDRy38QrOxQGU8KYugEoSE?= =?us-ascii?Q?6jjb26XMaZPuRIAEFQs39x3TJkfBzvZWgTAqI/p7sAuc7+AS3xj2D4Yo62aU?= =?us-ascii?Q?FlxK6HVkyHuA/csvZVrjyMMpf6I9ltuA7ROSr68w5nq6RRTGSNdl5xhlHfXT?= =?us-ascii?Q?+9b3sYD6gwCmxVh7kRQxCeXMLwiKiE9VGwwEFu+PY7yI8oWz+vyUbtBAeHHY?= =?us-ascii?Q?zYY27pPaulRS0bQbIjEpgrDOraMIvBxQaZuBBOcPz/DUxETCWASHRQEKkLgq?= =?us-ascii?Q?wxEac7LhWIxTKAKntRwLIC7onfa6YWmrrL7f+1VFpbs3LcCS7ftAXzXxr3N8?= =?us-ascii?Q?q4yizE1Ftdy8kiq6tQHGxSP81HD9SB8Y1QNb8vLeLrwoGbB3v0WRsoe+BCsV?= =?us-ascii?Q?E0wfmuo9tlQYH44BY7lCcA06Z+eB4hiUYgW+gKemyg4YK1Gwqu1vWAXHnJwt?= =?us-ascii?Q?7u31fK8K+f5Vlu3O+RUYaflvZvXm+7HUGT4zEYNhcVXE3YWCRwMm1Rcj/+2d?= =?us-ascii?Q?rGtESzl07XV9tAgGZdfBZZF5Vlw9pWrbiCVZsOlvTaSPlebBQGznUvXhwkd2?= =?us-ascii?Q?artd5rwfsc1nU3FxVNMS3mT/acCImj4oXCk03f+pqVi1ldFKmUF+saDFkCqw?= =?us-ascii?Q?EF4rcop/xyYsCtSo+nVE4Fwm/KS8LUG2pximTZdkMSGEhTNoTQws/Q+97R80?= =?us-ascii?Q?cd3XPb98BDJADFlt3JmFGei2pyCyf5WZKq9o90uhsvu90YuLzrB/saSUIzL2?= =?us-ascii?Q?m1dhnd4m52W9oQCpQMrPthfZ7TAEpFpZs/05EYT++R9uI5VnAnY4l3+ZK0q+?= =?us-ascii?Q?rvfd1kExwynoUjnwYTpqga7+fbaXqZ5NakguNOS7HJSihsOE0Cqgqv85SlYT?= =?us-ascii?Q?vus1KWS529DlYNNv485L9lgVz1J2D49gWl9KjIKx7u5PouEWX330bYp/Bz16?= =?us-ascii?Q?6d82mPxuFLZ+9F1SfY1xCRAOPSiZwZ3hZhs0a?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0076; 6:XG+rRkwWin7KqPgKx5eUP/kLwLE12oOCcOhLcUgY7HYN8AkJrkA6iCYb1pGT8ibe75fCUtcxWfScW/mEC27pcXNk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EDA0ZfQwfiLxLoM5++5LwSQNiP0GJmF4m6TYJj1Y83kDI8FzdT20nnxQwZbPzv6kmlCO5MYWID/EB X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2018 18:29:29.4948 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f2f24243-26ef-4f2f-0984-08d564eabd22 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0076 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: Tom St Denis <tom.stdenis@amd.com>, dri-devel@lists.freedesktop.org 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 |
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index 647eb5f40ab9..962838cfb1a3 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c @@ -390,14 +390,12 @@ static void ttm_dma_page_put(struct dma_pool *pool, struct dma_page *d_page) { struct page *page = d_page->p; unsigned i, num_pages; - int ret; /* Don't set WB on WB page pool. */ if (!(pool->type & IS_CACHED)) { num_pages = pool->size / PAGE_SIZE; for (i = 0; i < num_pages; ++i, ++page) { - ret = set_pages_array_wb(&page, 1); - if (ret) { + if (set_pages_array_wb(&page, 1)) { pr_err("%s: Failed to set %d pages to wb!\n", pool->dev_name, 1); }
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)