From patchwork Thu Dec 21 18:05:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christian_K=C3=B6nig?= X-Patchwork-Id: 10128169 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 55CC160390 for ; Thu, 21 Dec 2017 18:05:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EB1B29C37 for ; Thu, 21 Dec 2017 18:05:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4259B29C45; Thu, 21 Dec 2017 18:05:54 +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=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 CD6A929C37 for ; Thu, 21 Dec 2017 18:05:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A7E16E406; Thu, 21 Dec 2017 18:05:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id E69B56E406; Thu, 21 Dec 2017 18:05:51 +0000 (UTC) Received: by mail-wr0-x241.google.com with SMTP id p69so17046808wrb.8; Thu, 21 Dec 2017 10:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=g8LCbCtzTJfWBkzJq6QHP2YAxGCpkOaFe8UtqZE1mXY=; b=gYbqUlLoivAh2etbk5vzgkmPNw9n4JdyU3+jjdlOy2n8JAgW3XM1JDROQzgBITJ2IA EhdZutpUwUAFbZKfdBm4mIft/LFmVrmli1+aXmDBXAZz6709cHJ8kBpuJu9Hd2wk2Jgn wWEolyt7IVRr5YTOnLoZn5vyMhBRJgsPvyKfHYyVEN0i1Iub1Zbmmi8Q309S3CZ2/LyA plANdifOqMZXr+aPb0JjRScrPXWfe9p4NaVcrYKChwf/XB2spQpAwOPSiFosVsVcBHkt J1k+HDgzZTUAJ4CQHpAPSODcYOQUygt3xUwsk5sRPhSOtm6xdgDfDaP1Cj6H9ulsjGPt Japw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=g8LCbCtzTJfWBkzJq6QHP2YAxGCpkOaFe8UtqZE1mXY=; b=hOPCD7BcN6RGHZSp2N7i6xUpfWPty/bVC7erBgoU1TEgcgyMKCVdqSmAKD9mKOZpJL wnZK6VWb/RPWSpl0QLbH4VN25cRdZPhEMU+MG3N+JSPHgXvpADS1XkREEoWsuVHOxP08 dBcZgazT24bHwmwTe80l2tZojnnlaSA7ItcL8mjjab7xaQXxnea3KrCaq4g+Pv0S1FkJ meJcranMqS5jjwnvVnwLH3/FxoZKOHgQk4wdLsOUlertGohrs9JxBxPUhkeDM/wvKiFC bOmPUf9dMZoOupKkjqMpVBQulKKK2N543M0MZ24nTUNOtr3PLnR3cEu2eNEUAA7r4RYS 2Q6A== X-Gm-Message-State: AKGB3mKIQa+FXXs37rskMqBQKRSeiKlL0XHYCux0Qxt8Szs5YtkMDaaw qRUwJA5CYfAOJ5zR+FMrDtYBug== X-Google-Smtp-Source: ACJfBotrHgTYZuwAHKkT59A1FasSWCF3PiBrc3HfDJp2wkEV+gjvrhxq8RSk4ZXekhYl2GdVfPfY+g== X-Received: by 10.223.174.174 with SMTP id y43mr12457611wrc.196.1513879550131; Thu, 21 Dec 2017 10:05:50 -0800 (PST) Received: from localhost.localdomain ([2a02:908:1251:7981:4d5a:72ac:502a:47ff]) by smtp.gmail.com with ESMTPSA id q74sm11001514wmg.22.2017.12.21.10.05.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Dec 2017 10:05:49 -0800 (PST) From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/ttm: drop the spin in delayed delete if the trylock doesn't work Date: Thu, 21 Dec 2017 19:05:46 +0100 Message-Id: <20171221180546.1281-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 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 Thomas actually noticed that, but I didn't realized what he meant until now. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 60bb5c12b568..84dfa2368a72 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -592,6 +592,8 @@ static bool ttm_bo_delayed_delete(struct ttm_bo_device *bdev, bool remove_all) } else if (reservation_object_trylock(bo->resv)) { ttm_bo_cleanup_refs(bo, false, !remove_all, true); + } else { + spin_unlock(&glob->lru_lock); } kref_put(&bo->list_kref, ttm_bo_release_list);