From patchwork Fri Jan 26 18:29:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "StDenis, Tom" X-Patchwork-Id: 10186713 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 6722760383 for ; Fri, 26 Jan 2018 18:29:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 583D8297F7 for ; Fri, 26 Jan 2018 18:29:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CA3F29C25; Fri, 26 Jan 2018 18:29:39 +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 2EC9F297F7 for ; Fri, 26 Jan 2018 18:29:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4F236E65B; Fri, 26 Jan 2018 18:29:32 +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-by2nam01on0060.outbound.protection.outlook.com [104.47.34.60]) by gabe.freedesktop.org (Postfix) with ESMTPS id 49A646E60A; Fri, 26 Jan 2018 18:29:26 +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=vb8LiOgVMX+R/za5jJ1RtH/1jNzG9ifqhJQL3gsOBIA=; b=zSSjQYRBJ3Ww4q4bPstKdlGSnnRbGaeNYpxVa3YKkVwuc8UonchSZxLBJ3ZHGeFJNK0OEeyn85980Sh4rG5VICgV8lpZOejodQe0uDhmA4gUQhnrc5C2VlrMwIrrm5XyJCTz5/ak1MFB+kVXH/ozM/C8MM9aSXMNXwhPf8tJtic= 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:24 +0000 From: Tom St Denis To: amd-gfx@lists.freedesktop.org Subject: [PATCH 01/12] drm/ttm: Clean up indentation in ttm_bo.c Date: Fri, 26 Jan 2018 13:29:00 -0500 Message-Id: <20180126182911.20761-2-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: e8843e87-bf5e-4116-f1d4-08d564eaba1f 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:4tYcp/jjtdt301tOu1/BMJPs/jUdZWhiWbHDauD1nnaXKH9hNc5gHp/ICYjUU/CRz+v23L6vRxfkzx1A+42EfGBvZ9lBVYNPgA+8kdZc8PokqJAgWut2hRjs3X8yDPWpj21Zk0J3RUF7g6qv74VjaO9XxUDZ/aWzzb2q1nzInm9VXmMI9F18MG1RH8pCo1rFpxi30ZW7xXqAPV+ACV1mmi3v588viMNOAw2wmvvQn2OQ1rv4jcJucbaV5xEhbTDl; 25:KyfDP/hoZMqfudBHe9uDwQ6b6ZEVvQ+IUGBS2NJfRc4Ac+K53nVoQvPliItiDg88x0eg/qAaJGPmnBdkcudq/Sxao9QpfPRAdREofx0E212wdEzizjdLX5lAMZFNYp3evlaH2iTje7uhv2KPSoxdv/h6QbEU5Oo/1DT6B26eTd8jlhAsY1hLBNYrknkeFjr4mO3pCb7Ld49HB3PRYhOPxLZrrVMi5OoawVWHaTPZuVcJSnuU34V3ohuWbc3meiaCVwmEcL6T4IB2Q9PXTk9EB/EQXJrQ447hmLoBRDd/MWP0wa92HziCYfcOeXTnk6X1fvZamA0R30r+33ftrtIM3g==; 31:fqjwOxaXZC2cSe/ryXrXaTrPadJrSXYrbGinV/mWut5gyWWw+V9xzaSfjjflRo3rHTt9Ae4QQqtWqHjysZ79Zef+UFipbKLgbmdR5Vspb7vL54N93vifkd6WwfEDAMAp32snRynf0gOmmK39NmHeybh0p1jYsw4CPxnLERAC7+Cog4MdCReA5DDNLfqZh/XYjpeYCoSNl1KbMOLBr7dNg2nS2qj9WyTbdSHCHMXeHo4= X-MS-TrafficTypeDiagnostic: DM5PR1201MB0076: X-Microsoft-Exchange-Diagnostics: 1; DM5PR1201MB0076; 20:3m2DnXmpveGT4HqdZQt0YRq5hAe2o0GWPdb1X+fkp14SKOXRskVd4fg1/8UtF0J4aP2qLT+5+wG4SUdQ3hKHWrF/rHwGeuIiEknN//QR0clxzt16B9GX05iWecgdj8ny5ZCtdg/L9OfN8YwQRKQGj5OrK5RJJTDYsWf8ijMHr+5iu8hpalsQ6LxgKw38IHR5mPE5f7WND0hxGQY9B7SDl1wWfRes1eskKWj2/M73jiQo619tE0sl1RIwApN76f+Epoujyrn8LQDpsRS33dgtH8kIcTK851gBWwm8A9zcWpRzudMm7CmP3YzocZ/ktxbRBO7KtV4hvvR6Sv6YZbSDvQHihRBM+zCwbHuCz+2IEZQADJ6J+83CGVlZw7GQdIQFxEsrcChSH7t2R9wSxB4YIE3ohtMD5+ozNVcY/CU9NxujrjX6DArhV3Uj3wDQsDOBzBTut6YZpGVeSaLyZX6WSQG01vmPPeMiy4QhHtKrbCVwrwBl1ethvpoth/w/TaVK; 4:+9Z/fvK5XEcA+GuV7+UV/0JpO7Iy3/eqo6VwrSTLWjeXVwT9bf80or1PwcR8EkXU5zwZy8BbrfKRCNOOtpSZq1/aZGV9BGjAz8coJROGpNF5Tj0yz6/M9cbdUHt6j4qRH+LCnL8gjq8C85ya1BYvEJoawoZNoNv7cF9HGznndWsQHXLbZ4bLVuJjt3bQB9SN9K0ETGMUlQCxxbhExKn4sVMO5bktyCAkODC15Wla7B1Tfv+BVNiexfsIU7Fzk/DV/IVQfHSjLd25JX6Q+C5CIGe85xmHx58e01H1ttOBS0bMjxszTCvQiNo37RznXkrf X-Microsoft-Antispam-PRVS: 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)(59450400001)(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:PRvbx5qyMuO8p49u0ls8APM1J4XnFr4tzC0AjlS?= =?us-ascii?Q?bF6RTaWJ4zZIvKQpzV2brC2SGQRSEp+N0iWVfwdgoMkcQOijtWCvp3SEx7JR?= =?us-ascii?Q?KG1j4sIsccyyvYR/ObZ8R0yksOE9eleQb38F05JAVpSzfS8kh4Z1xhE0HTpO?= =?us-ascii?Q?7YEhqHYKlVvgxmMRpmAnZygGv/fjVcx881Pr/32sRkbVuBZH5UtqjUo9b4zD?= =?us-ascii?Q?/OVtff4udhNz51yxoIBicE/0VjCNVYETNaUVGJfCAYbmmhRYgUy/S/h5nRRH?= =?us-ascii?Q?a1y/3peCiMPygO0lRWWRDV/yQ4NValp/RCzlOP+L/0PISyeQmE6n8RM5lfIP?= =?us-ascii?Q?Vqrm9cWndCyYWj1Ml690lGmvuvb9q9q9yvVHPw4pIqbCXii3c4PKJ7zwy3zb?= =?us-ascii?Q?lKPWA6DKOgTPhjPeGp1Rnzrxd8IGpi5JKqQDaKJO9u/JQ5Yw+hc9YCNtEORi?= =?us-ascii?Q?WgugjCGTeV0Av/A2Lfs95L4TDRZW62LnzlMnxBePvkiTSd3jSYEGL0YqEB1C?= =?us-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f9VZ15Mn+7q8C0AJosOFE5QePeYh X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2018 18:29:24.4480 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e8843e87-bf5e-4116-f1d4-08d564eaba1f 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom St Denis , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Tom St Denis --- drivers/gpu/drm/ttm/ttm_bo.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index d33a6bb742a1..8cf89da7030d 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -149,9 +149,8 @@ static void ttm_bo_release_list(struct kref *list_kref) mutex_destroy(&bo->wu_mutex); if (bo->destroy) bo->destroy(bo); - else { + else kfree(bo); - } ttm_mem_global_free(bdev->glob->mem_glob, acc_size); } @@ -163,7 +162,6 @@ void ttm_bo_add_to_lru(struct ttm_buffer_object *bo) reservation_object_assert_held(bo->resv); if (!(bo->mem.placement & TTM_PL_FLAG_NO_EVICT)) { - BUG_ON(!list_empty(&bo->lru)); man = &bdev->man[bo->mem.mem_type]; @@ -614,10 +612,9 @@ static void ttm_bo_delayed_workqueue(struct work_struct *work) struct ttm_bo_device *bdev = container_of(work, struct ttm_bo_device, wq.work); - if (!ttm_bo_delayed_delete(bdev, false)) { + if (!ttm_bo_delayed_delete(bdev, false)) schedule_delayed_work(&bdev->wq, ((HZ / 100) < 1) ? 1 : HZ / 100); - } } static void ttm_bo_release(struct kref *kref)