From patchwork Fri Oct 19 08:54:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 10648877 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9149112B for ; Fri, 19 Oct 2018 08:55:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D97A228915 for ; Fri, 19 Oct 2018 08:55:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDDF228924; Fri, 19 Oct 2018 08:55:30 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 8C2F328915 for ; Fri, 19 Oct 2018 08:55:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DC256E2A6; Fri, 19 Oct 2018 08:54:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A7346E275; Fri, 19 Oct 2018 08:54:41 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 08730AEEC; Fri, 19 Oct 2018 08:54:40 +0000 (UTC) From: Thomas Zimmermann To: christian.koenig@amd.com, ray.huang@amd.com, Jerry.Zhang@amd.com, alexander.deucher@amd.com, David1.Zhou@amd.com, airlied@linux.ie, kraxel@redhat.com, bskeggs@redhat.com, syeh@vmware.com, z.liuxinliang@hisilicon.com, zourongrong@gmail.com, kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com Subject: [PATCH 14/18] drm/ttm: Remove struct ttm_bo_global_ref and helpers Date: Fri, 19 Oct 2018 10:54:19 +0200 Message-Id: <20181019085423.28159-15-tzimmermann@suse.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181019085423.28159-1-tzimmermann@suse.de> References: <20181019085423.28159-1-tzimmermann@suse.de> MIME-Version: 1.0 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: Thomas Zimmermann , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The struct ttm_bo_global_ref data type providede a workaround for passing an instance of struct ttm_mem_global to ttm_bo_global_init(). This functionality has been replaced by struct ttm_global and all drivers have been converted. struct ttm_bo_global_ref is obsolete. Signed-off-by: Thomas Zimmermann --- include/drm/ttm/ttm_bo_driver.h | 40 --------------------------------- 1 file changed, 40 deletions(-) diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index c6ee07d10281..e51ced5f5e75 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -31,7 +31,6 @@ #define _TTM_BO_DRIVER_H_ #include -#include #include #include #include @@ -889,43 +888,4 @@ pgprot_t ttm_io_prot(uint32_t caching_flags, pgprot_t tmp); extern const struct ttm_mem_type_manager_func ttm_bo_manager_func; -/** - * struct ttm_bo_global_ref - Argument to initialize a struct ttm_bo_global. - */ - -struct ttm_bo_global_ref { - struct drm_global_reference ref; - struct ttm_mem_global *mem_glob; -}; - -/** - * ttm_bo_global_ref_init - * - * @ref: DRM global reference - * - * Helper function that initializes a struct ttm_bo_global. This function - * is used as init call-back function for DRM global references of type - * DRM_GLOBAL_TTM_BO_REF. - */ -static inline int ttm_bo_global_ref_init(struct drm_global_reference *ref) -{ - struct ttm_bo_global_ref *bo_ref = - container_of(ref, struct ttm_bo_global_ref, ref); - return ttm_bo_global_init(ref->object, bo_ref->mem_glob); -} - -/** - * ttm_bo_global_ref_release - * - * @ref: DRM global reference - * - * Helper function that releases a struct ttm_bo_global. This function - * is used as release call-back function for DRM global references of type - * DRM_GLOBAL_TTM_BO_REF. - */ -static inline void ttm_bo_global_ref_release(struct drm_global_reference *ref) -{ - ttm_bo_global_release(ref->object); -} - #endif