From patchwork Wed Sep 11 11:09:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11140913 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92BE21395 for ; Wed, 11 Sep 2019 11:09:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B15520CC7 for ; Wed, 11 Sep 2019 11:09:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B15520CC7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F2A26EA8E; Wed, 11 Sep 2019 11:09:22 +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 B22BA6EA8D for ; Wed, 11 Sep 2019 11:09:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 36E16AF84; Wed, 11 Sep 2019 11:09:19 +0000 (UTC) From: Thomas Zimmermann To: daniel@ffwll.ch, kraxel@redhat.com, airlied@linux.ie, corbet@lwn.net, z.liuxinliang@hisilicon.com, zourongrong@gmail.com, kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com, hdegoede@redhat.com, sam@ravnborg.org, yc_chen@aspeedtech.com Subject: [PATCH v2 3/4] drm/vram: Unexport internal functions of VRAM MM Date: Wed, 11 Sep 2019 13:09:09 +0200 Message-Id: <20190911110910.30698-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190911110910.30698-1-tzimmermann@suse.de> References: <20190911110910.30698-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: virtualization@lists.linux-foundation.org, Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The init, cleanup and mmap functions of VRAM MM are only used internally. Remove them from the public interface. v2: * update for debugfs support Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann --- drivers/gpu/drm/drm_gem_vram_helper.c | 38 ++++----------------------- include/drm/drm_gem_vram_helper.h | 6 ----- 2 files changed, 5 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index c87fed608ffa..1a05e2a97b93 100644 --- a/drivers/gpu/drm/drm_gem_vram_helper.c +++ b/drivers/gpu/drm/drm_gem_vram_helper.c @@ -889,19 +889,8 @@ int drm_vram_mm_debugfs_init(struct drm_minor *minor) } EXPORT_SYMBOL(drm_vram_mm_debugfs_init); -/** - * drm_vram_mm_init() - Initialize an instance of VRAM MM. - * @vmm: the VRAM MM instance to initialize - * @dev: the DRM device - * @vram_base: the base address of the video memory - * @vram_size: the size of the video memory in bytes - * - * Returns: - * 0 on success, or - * a negative error code otherwise. - */ -int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, - uint64_t vram_base, size_t vram_size) +static int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, + uint64_t vram_base, size_t vram_size) { int ret; @@ -920,34 +909,17 @@ int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, return 0; } -EXPORT_SYMBOL(drm_vram_mm_init); -/** - * drm_vram_mm_cleanup() - Cleans up an initialized instance of VRAM MM. - * @vmm: the VRAM MM instance to clean up - */ -void drm_vram_mm_cleanup(struct drm_vram_mm *vmm) +static void drm_vram_mm_cleanup(struct drm_vram_mm *vmm) { ttm_bo_device_release(&vmm->bdev); } -EXPORT_SYMBOL(drm_vram_mm_cleanup); -/** - * drm_vram_mm_mmap() - Helper for implementing &struct file_operations.mmap() - * @filp: the mapping's file structure - * @vma: the mapping's memory area - * @vmm: the VRAM MM instance - * - * Returns: - * 0 on success, or - * a negative error code otherwise. - */ -int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma, - struct drm_vram_mm *vmm) +static int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma, + struct drm_vram_mm *vmm) { return ttm_bo_mmap(filp, vma, &vmm->bdev); } -EXPORT_SYMBOL(drm_vram_mm_mmap); /* * Helpers for integration with struct drm_device diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h index fd978e0c9542..9aaef4f8c327 100644 --- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -171,12 +171,6 @@ static inline struct drm_vram_mm *drm_vram_mm_of_bdev( } int drm_vram_mm_debugfs_init(struct drm_minor *minor); -int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev, - uint64_t vram_base, size_t vram_size); -void drm_vram_mm_cleanup(struct drm_vram_mm *vmm); - -int drm_vram_mm_mmap(struct file *filp, struct vm_area_struct *vma, - struct drm_vram_mm *vmm); /* * Helpers for integration with struct drm_device