From patchwork Tue Dec 12 09:33:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "He, Hongbo" X-Patchwork-Id: 10106561 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 AC54A602B3 for ; Tue, 12 Dec 2017 09:35:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3DD029B44 for ; Tue, 12 Dec 2017 09:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95FC829B6A; Tue, 12 Dec 2017 09:35:09 +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 3936729B44 for ; Tue, 12 Dec 2017 09:35:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADD4C6E35C; Tue, 12 Dec 2017 09:35:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0085.outbound.protection.outlook.com [104.47.32.85]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC4646E35C; Tue, 12 Dec 2017 09:35:07 +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=QWv+ATNLbWFy8obPCk/N2+Y5aISb4Aus/hvFSyWh+GY=; b=jBOUqgpZArn7aHyw59bTB8WUsrtFhWg+77i9gbtZozMYnX1aCAbObrQIPHYrpJjtU/Hts08GoMHJ81waz3WvUjwWp3KL8hd7jvmS1isRic/v2S/Q6cdSC16l2vC34I8dsMc6zz1MA1M6nfGJTNPuMP2FtjqtqfqG74EwxGskRVI= Received: from SN1PR12CA0036.namprd12.prod.outlook.com (10.162.96.174) by CY4PR1201MB0056.namprd12.prod.outlook.com (10.172.77.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Tue, 12 Dec 2017 09:35:05 +0000 Received: from CO1NAM03FT064.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::203) by SN1PR12CA0036.outlook.office365.com (2a01:111:e400:5174::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Tue, 12 Dec 2017 09:35:05 +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 SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT064.mail.protection.outlook.com (10.152.81.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.302.6 via Frontend Transport; Tue, 12 Dec 2017 09:35:04 +0000 Received: from roger-build-server.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.361.1; Tue, 12 Dec 2017 03:35:03 -0600 From: Roger He To: , Subject: [PATCH 4/6] drm/ttm: init locked again to prevent incorrect unlock Date: Tue, 12 Dec 2017 17:33:46 +0800 Message-ID: <1513071228-29551-4-git-send-email-Hongbo.He@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513071228-29551-1-git-send-email-Hongbo.He@amd.com> References: <1513071228-29551-1-git-send-email-Hongbo.He@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)(7966004)(376002)(346002)(39860400002)(2980300002)(428003)(189003)(199004)(104016004)(8676002)(50226002)(16586007)(53416004)(2906002)(2950100002)(50466002)(110136005)(68736007)(47776003)(5660300001)(53936002)(7696005)(59450400001)(575784001)(86362001)(316002)(8936002)(48376002)(6666003)(36756003)(76176011)(51416003)(356003)(72206003)(97736004)(305945005)(508600001)(106466001)(450100002)(81166006)(77096006)(81156014)(4326008)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1201MB0056; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT064; 1:Lr1RXNmNx0DifK6lW5QxVyMDBBNHLGoIh0wT3JfIko/2XMBIwHCxIlwRdE/SA7TnTG909NhwVnayrSgiljVsDS9ZVGbkU3tpptAXAG/1RBkbEhucnRYhsASTDKwoHSLK X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff583de0-6789-4a47-b539-08d54143a059 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:CY4PR1201MB0056; X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0056; 3:+Sf6alFLtVcLrSTTxdzMjPT7ji7r4aCh70hZC0tGoj6MU/QMLlSA1embStKWruTnseca45Xi/xlMr+JObIGLAxB4/eSntqWWMjDYZo2BAnkgqxf4+QYdOGd3BQcrRe+79mFW9usFyFM00X020nwh9p6HGvIZb/ogunUWNA38wp49Lucy6+AOU5jhTg1jIjLWtIKL/wd1YfUIs61KgCEJsS1w2qwV/tK1X7P6sqZey1uNnGtmfByzOtAmXHBq9CCRb9EXKfkjEg50lvqtAwtoxZmCnTCXyZtAga+eIeFMvG9Y5byU1hm+2TIgFeAGKf+oBAzV1Hqb2YejH3Maq9BKtBxF5WNSDM2jO8dankkOif8=; 25:zng+lZGB9iQ8sJN0n3xTKKqk1XEqWde5ryhNTXHs0bUP0bJXt4CykVdRagLgu4dEyM461PJ78LurWX7vlvIV3tVC5XafG0ymt1x4mN9PHKYdh71uo0P48t6bpKN2REGJelyaRnhPrAguh8TsKRZTK4hddbRrlFDtkisqtYm8nYdqGmRSH8sFP30YANbypIikwnjynZJEXpXbQ4BL+5gZn/ilzDh95hbbUZg3UsrGcuIx2cf2iEQ716aZWHlt0QfXM7tuBICIiKd1yJcypzaT9G0iH410akAMT6FgU8+GJawvq35SBFcW4gbqgCGDXVvgW2Xg0DUWLPCrghX3A6g+Dw== X-MS-TrafficTypeDiagnostic: CY4PR1201MB0056: X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0056; 31:XJShxOSo+CfOtD1osww2taimwYi508TDGFH0q29ihc6AqkqGMA0L/3Avvq5nMA5AnGi7ZQ2n6cJlMVTyln8mIZrnGDRmwuxPCRxOKD6CdPLQYakDVDfgHIl35SlEFjzlmBfmqHUU455rTqhXZLhzPu2Me9E4iPRGP1uRIFM8ifgTH5nLefVutEDSoDKJ5A7EpOE/P4/8YzcEwWGobrp7Hw1MIjsypiH9G3uTbyEUzp0=; 20:xEmCcADY+UxJky1tipkn1H2DOxIhnAas5oyBVxMOYZXHojvXTY8cD8+iPrkTUtoPwIwHSVBKGl5qbLS67abl3gq5quXicnw1VbLBIriQkNIUhBvWLVgUPhtcXm8b6Y24F+TXX9VKnA3hALmwWdG3+xGY9cdFjlvwWpLjEW1HYrfB02zHYCReg0f8G/v0LGXEU76fSi7eVJtzJR6i3l9DjZc84d/6tgA62c015W381wMqU6xtlPslinmu6ryu3gdVueB9wVpGqgdh+kk/X1Tp43xGaVDycyHIjZ28Kis2sL7iKWCbKRZQeYY/BiKFBAQaeWfxV54vsOK84wiVRqbDvP3PSeGNbC0MXXHWWkd58y7I35F6SygcLjUiksAscfMnHK++xoRrTCsTnDQaz8PTUnsfkXWI0LMsNnaQWK2tEbkPE303pB+sOSOg5iRQzcWbD7bs/5Sck8xRBiGA6y3R8Ph6Dmvx5MELsRse/qsA60G2o/fFYsploCZb5GQRqJDV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93003095)(3002001)(3231023)(10201501046)(6055026)(6041248)(20161123558100)(20161123560025)(201703131423075)(201703011903075)(201702281528075)(201703061421075)(20161123562025)(20161123555025)(20161123564025)(6072148)(201708071742011); SRVR:CY4PR1201MB0056; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR1201MB0056; X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0056; 4:cyBLOEc8nQh4bmEzkv0XbRhk22BDCFudU0pz5GWTnxIuYm/oZneDUE9LQ8Zutn7PhTT4l22IapsAMceAaM7+1jga1NJoq2d4SZJoXiyahGKtrcE8l+NV6fAyz+K/ukftZi0M3xaYEJla/drDnsKkPXcmDcLK3xkX4pNXUG2UdaJnf51fvRMv5npD2d7wViMV4jfT1eMI6tDaLGpOuMkCh+OX9pyub9OqnGHAY7eKqsHkmp2YUX6swhom1g8mpn7ni6EHH7weiHJq2ZJlgWCEb8d3GrX23rKRfw1Ne5RYcX6Y8nzmv0wbSDeWne9rIVLV X-Forefront-PRVS: 051900244E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR1201MB0056; 23:/bQrxRJGbwlBuVBsb4TOQwvvIrg0pgq3ZT+4kZZ?= =?us-ascii?Q?qZjcaD1bNUyj7qrc5phw+gwiZEBNICWriWNMENEK2EyEnOMzF9fp0CGG1nOT?= =?us-ascii?Q?LJSrpBR9/oXlYKhiAo4TsRVVKY2DI1LpjLj6gxCCGCrkjHztl5luyY6r9q3y?= =?us-ascii?Q?DREN/GwXFA3FCzETLBlbqJcVbhhNFCo/r+5c2UaKCDQfzUWIARcHXp9JTLxX?= =?us-ascii?Q?+KY+Zi5tFwMZOIyg9hBNu65C2IizEs7WR0rC4V84sOsmNuxcMpoPpNFKNkma?= =?us-ascii?Q?ulixZsWMaq6jb6u5BELeSmqdQZljClYSjUXpi9lbPvvE98Yp7rzt/z/tFlP+?= =?us-ascii?Q?1oMrd98MsoswajMewFS6pbjUOpT1my+4q+YNO+Zg5kkAzNnSwEVv7k94pjAN?= =?us-ascii?Q?ZLYpb4vVCxnUV08ZqTYkEqY6vwP2aTs8zXAhHXc2s4855DGegj7hYI0aLHlZ?= =?us-ascii?Q?xDpSy/2TYdXMtvU+91L+b2XKTfVgVHCE7JpClXvzgTAR4AzaBjHNYqaCc6DT?= =?us-ascii?Q?s8xJa801XC45iGQeo1JEg5gBRROKOEtJaXhL+Lw9Vwa/wQavwyCw5dHd10CE?= =?us-ascii?Q?1TiTPr4TZjjgPD8dTGsUozT4/aK+g57YAdYHWaYN42jlTbHa+EdXTw2KfxOH?= =?us-ascii?Q?D8RWUqjtih/NonHMa5e8byHtXSZ9cJyBOOmnr+qlX445KZePpCP0fPqUZwSA?= =?us-ascii?Q?cuRZZGkT/yfon0OHme+GAfRT3Ef083yr534kOS82NH27YvzPkp5DrRWOXpn6?= =?us-ascii?Q?4EulZGAvXdY4v8fH0ESjFONAyjGXt9eEMhgCPavbCPLeaZTdTGBf4yETef1l?= =?us-ascii?Q?YOOZAXmBQ8iPyA+xbkFZEB1SSo4wkMz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s6a4yuyWqzbA6Z44JqzIVJFCH93W09pIMseY81vqryN3Ph30IIwOJ49TlvDUr1F/IL8hmsERrUlSbp0rkm5+xV/pEujM5hcC4DaAVCjfI7RT1DOWm06dXPQalZCy+rJiCYOZG+nJjDfN4yYU56/o SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR1201MB0056; 20:F9ucCIzZhCxIoE7S4lDfdR2sFFV6DUvP5Xwi5MScozC975JWfIHmcgPjS/gofJsyXdpLenpdaWYsTr2AoXcB//oww7hIDM7rjqAFNTlmAOrfLU90XXsWdIB0vZX7oa9HUQ+iGhWYrVZzavLvyJw5rnHEudV9uV2lziBSmABTZaYsETm1QPSyfASuRrGPM6iMshylexRpul07rOYNW4htx18p/tEgT2Km767nUuQDuviSYc8jWOflFGF2oD7S59dn X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 09:35:04.8672 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff583de0-6789-4a47-b539-08d54143a059 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: CY4PR1201MB0056 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: I8db51d843955f5db14bb4bbff892eaedbd9f0abe Signed-off-by: Roger He Reviewed-by: Christian König Reviewed-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 17fe8be..eb8c568 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -735,6 +735,7 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev, place)) { if (locked) reservation_object_unlock(bo->resv); + locked = false; continue; } break;