From patchwork Mon Dec 18 05:41:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "He, Hongbo" X-Patchwork-Id: 10118271 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 20AB860390 for ; Mon, 18 Dec 2017 05:41:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1433C28EC8 for ; Mon, 18 Dec 2017 05:41:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08FEF28ED3; Mon, 18 Dec 2017 05:41:34 +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_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 45A0328EC8 for ; Mon, 18 Dec 2017 05:41:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE9C56E15B; Mon, 18 Dec 2017 05:41:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0054.outbound.protection.outlook.com [104.47.33.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id D2A896E15B for ; Mon, 18 Dec 2017 05:41:29 +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=+LLpEem4wHScIO+HzhaTqhh0RndF9a050bikPTJF+Bw=; b=M/Ggeray3LG9OGFqXqtePQ2y2o7sw/ReHiFDvXoWB7ZeFnlBDjiiERyJI89PPjyl8hEuJ+g0eYoM+2zTHI+WMUka1Uh1cJrjQxP12ccszQoZ0rPze0dip8MsKQn48yvzpJbfITQcx175iJP55zLVTBruPDXHP9odZtQYozR1mGs= Received: from MWHPR1201MB0127.namprd12.prod.outlook.com (10.174.98.142) by MWHPR1201MB0128.namprd12.prod.outlook.com (10.174.98.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Mon, 18 Dec 2017 05:41:27 +0000 Received: from MWHPR1201MB0127.namprd12.prod.outlook.com ([10.174.98.142]) by MWHPR1201MB0127.namprd12.prod.outlook.com ([10.174.98.142]) with mapi id 15.20.0323.018; Mon, 18 Dec 2017 05:41:27 +0000 From: "He, Roger" To: =?utf-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= , "dri-devel@lists.freedesktop.org" Subject: RE: [PATCH 3/3] drm/ttm: cleanup some old defines Thread-Topic: [PATCH 3/3] drm/ttm: cleanup some old defines Thread-Index: AQHTddL8ayRu9vOM/k6TeGL7Yhmc4KNImd9A Date: Mon, 18 Dec 2017 05:41:27 +0000 Message-ID: References: <20171215183144.16520-1-christian.koenig@amd.com> <20171215183144.16520-3-christian.koenig@amd.com> In-Reply-To: <20171215183144.16520-3-christian.koenig@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Hongbo.He@amd.com; x-originating-ip: [116.228.147.241] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; MWHPR1201MB0128; 20:NerQ02BrCDDy0VzrxFenGpuQzMUP/V7G+qYjVNdcVQ52cdUQk6m4Igos1KA/2TH3T5LYYSHS7awhy3FBXl16zLDLZTHWS4Di8BohlL2pVFWGn5GRObNwKJROvhcFe8V799IAPQtES3EMG1I1AdORHmdXl3sqQ2fSXXHfYrao2GGjX0Tok62zBPJ8uVsQ5rD8vSy8gQ5KsXGUKHwvGCjoTHq5X9AV1sZE0DcxpUFbbahkIj7ckoLgVHnFcP6zUeha x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 4038535e-9647-434f-6526-08d545d9fbc4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:MWHPR1201MB0128; x-ms-traffictypediagnostic: MWHPR1201MB0128: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110)(217544274631240); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231023)(3002001)(6055026)(6041248)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(6072148)(201708071742011); SRVR:MWHPR1201MB0128; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR1201MB0128; x-forefront-prvs: 0525BB0ADF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(39860400002)(396003)(376002)(199004)(189003)(13464003)(74316002)(66066001)(966005)(6506007)(14454004)(99286004)(2950100002)(8936002)(2501003)(6116002)(102836003)(3846002)(5660300001)(2900100001)(72206003)(6436002)(229853002)(478600001)(33656002)(53546011)(7696005)(25786009)(76176011)(77096006)(97736004)(59450400001)(8676002)(55016002)(53936002)(7736002)(3660700001)(3280700002)(305945005)(6246003)(105586002)(110136005)(9686003)(106356001)(6306002)(81156014)(81166006)(39060400002)(68736007)(316002)(86362001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR1201MB0128; H:MWHPR1201MB0127.namprd12.prod.outlook.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) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4038535e-9647-434f-6526-08d545d9fbc4 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2017 05:41:27.5558 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0128 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 The series is: Reviewed-by: Roger He Thanks Roger(Hongbo.He) -----Original Message----- From: dri-devel [mailto:dri-devel-bounces@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Saturday, December 16, 2017 2:32 AM To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/ttm: cleanup some old defines 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(-) 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); -- 2.11.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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)