From patchwork Fri Dec 15 18:31:44 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: 10115841 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 82D396019C for ; Fri, 15 Dec 2017 18:31:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C7A02A0EA for ; Fri, 15 Dec 2017 18:31:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 714432A0EE; Fri, 15 Dec 2017 18:31: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 3A4D02A0EA for ; Fri, 15 Dec 2017 18:31:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E696E6E88B; Fri, 15 Dec 2017 18:31:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id C68C96E883 for ; Fri, 15 Dec 2017 18:31:50 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id 64so19287773wme.3 for ; Fri, 15 Dec 2017 10:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=rjG4Xc67bigEy0e3CFp540zdnoNYtYpynIn0ExwRovg=; b=J+qRjgXWMSDyZhcSUexNIudMmG0PkEAjTdf0+MpJuGsM2E2wdozcjCSyhSf2QwzDX0 Vod9ipn3KTlzzJ4XFzOP8JLdTUCUsFzwMf8HuhFa1qLi7asENZ2vHSlowhGLb7BSTWGL L/R2MYf/LOMOmv+dE0TWAYz6ARIhhGse3mNtHi0VzEPTOalzNxR7x3vGVrezMFQ+jXhY yPdpbtjOBgp6DfDXQ0wL9saU/XXHmVQO4ElSUxyJcEArJ9b2pMoSmBCHRpGv42P2s7in Dd7vKMZa4bA6BnN5J6VviJmomOY1iIp+jSkJhiTVq3v66/Tx3aywbUZ8hsafF4IGctaW sQ6w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=rjG4Xc67bigEy0e3CFp540zdnoNYtYpynIn0ExwRovg=; b=WDLG9q7w22Da8csQzWR2lUbNt8a8KTtZyk/lk8zzsFWjp+WgEQyfNIH+WIlyAh+SrZ YhswFj6pLkQbEKPJw49H5KHOvXhHVLUC3nb06J7arSm1RRfOW1F4haLeEDFwoxMA+FB/ VwQF8e2IJanRs6QAPNEHIgCkCQ9AJ3Qqjn+N/dOUk5xYGC1c2nckKOIo1Oh1PR763c3T wAJx9VOGsdPNuZrFXNMyBmAfgjFX3A9tfSBKYrFb4YYbHTCJ1OCQbmDYZBxrkHX/9wCE lV8+11LPK+DF+LEyvNkRaotti7UnHb9e4/8jhJ9AMXu5ruH3udUD9w/srbUrvH93VxLB Qghg== X-Gm-Message-State: AKGB3mLm1OclA1deTOyhkcZ/mKkb7aeaqKgvSU+971xWrBocESQv5of/ CHx3M9hpkFmznChEYWCpqBcnWg== X-Google-Smtp-Source: ACJfBouaC0U3PROK9qDDsjGS0mViv9YR8fJWPccuXQolO4bBHEc6+EedIH3eO9KnW41qg9NTJO6PDA== X-Received: by 10.28.128.214 with SMTP id b205mr6548227wmd.82.1513362709268; Fri, 15 Dec 2017 10:31:49 -0800 (PST) Received: from localhost.localdomain ([2a02:908:1251:7981:52e:5a82:dbe5:f509]) by smtp.gmail.com with ESMTPSA id a203sm4542911wmh.45.2017.12.15.10.31.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Dec 2017 10:31:48 -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 Subject: [PATCH 3/3] drm/ttm: cleanup some old defines Date: Fri, 15 Dec 2017 19:31:44 +0100 Message-Id: <20171215183144.16520-3-christian.koenig@amd.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171215183144.16520-1-christian.koenig@amd.com> References: <20171215183144.16520-1-christian.koenig@amd.com> 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 Use pr_debug instead of TTM_DEBUG, fix the lockdep assert and remove the unused constant. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 5cc96b232c17..60bb5c12b568 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -42,10 +42,6 @@ #include #include -#define TTM_ASSERT_LOCKED(param) -#define TTM_DEBUG(fmt, arg...) -#define TTM_BO_HASH_ORDER 13 - static int ttm_bo_swapout(struct ttm_mem_shrink *shrink); static void ttm_bo_global_kobj_release(struct kobject *kobj); @@ -233,7 +229,7 @@ static int ttm_bo_add_ttm(struct ttm_buffer_object *bo, bool zero_alloc) int ret = 0; uint32_t page_flags = 0; - TTM_ASSERT_LOCKED(&bo->mutex); + reservation_object_assert_held(bo->resv); bo->ttm = NULL; if (bdev->need_dma32) @@ -1544,12 +1540,12 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev) cancel_delayed_work_sync(&bdev->wq); if (ttm_bo_delayed_delete(bdev, true)) - TTM_DEBUG("Delayed destroy list was clean\n"); + pr_debug("Delayed destroy list was clean\n"); spin_lock(&glob->lru_lock); for (i = 0; i < TTM_MAX_BO_PRIORITY; ++i) if (list_empty(&bdev->man[0].lru[0])) - TTM_DEBUG("Swap list %d was clean\n", i); + pr_debug("Swap list %d was clean\n", i); spin_unlock(&glob->lru_lock); drm_vma_offset_manager_destroy(&bdev->vma_manager);