dma-buf: move dma-buf symbols into the DMA_BUF module namespace

In order to better track where in the kernel the dma-buf code is used,
put the symbols in the namespace DMA_BUF and modify all users of the
symbols to properly import the namespace to not break the build at the
same time.

Now the output of modinfo shows the use of these symbols, making it
easier to watch for users over time:

$ modinfo drivers/misc/fastrpc.ko | grep import
import_ns:      DMA_BUF

Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20211010124628.17691-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman
2021-10-25 14:53:08 +02:00
parent d46e58ef77
commit 16b0314aa7
23 changed files with 66 additions and 17 deletions
+3
View File
@@ -41,6 +41,7 @@
#include <linux/swiotlb.h>
#include <linux/dma-buf.h>
#include <linux/sizes.h>
#include <linux/module.h>
#include <drm/ttm/ttm_bo_api.h>
#include <drm/ttm/ttm_bo_driver.h>
@@ -59,6 +60,8 @@
#include "amdgpu_res_cursor.h"
#include "bif/bif_4_1_d.h"
MODULE_IMPORT_NS(DMA_BUF);
#define AMDGPU_TTM_VRAM_MAX_DW_READ (size_t)128
static int amdgpu_ttm_backend_bind(struct ttm_device *bdev,
+2
View File
@@ -15,6 +15,8 @@
#include "armada_gem.h"
#include "armada_ioctlP.h"
MODULE_IMPORT_NS(DMA_BUF);
static vm_fault_t armada_gem_vm_fault(struct vm_fault *vmf)
{
struct drm_gem_object *gobj = vmf->vma->vm_private_data;
@@ -6,6 +6,7 @@
*/
#include <linux/slab.h>
#include <linux/module.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_fb_helper.h>
@@ -17,6 +18,8 @@
#include "drm_internal.h"
MODULE_IMPORT_NS(DMA_BUF);
#define AFBC_HEADER_SIZE 16
#define AFBC_TH_LAYOUT_ALIGNMENT 8
#define AFBC_HDR_ALIGN 64
+3
View File
@@ -29,6 +29,7 @@
#include <linux/export.h>
#include <linux/dma-buf.h>
#include <linux/rbtree.h>
#include <linux/module.h>
#include <drm/drm.h>
#include <drm/drm_drv.h>
@@ -39,6 +40,8 @@
#include "drm_internal.h"
MODULE_IMPORT_NS(DMA_BUF);
/**
* DOC: overview and lifetime rules
*
@@ -5,10 +5,13 @@
#include <drm/drm_prime.h>
#include <linux/dma-buf.h>
#include <linux/module.h>
#include "etnaviv_drv.h"
#include "etnaviv_gem.h"
MODULE_IMPORT_NS(DMA_BUF);
static struct lock_class_key etnaviv_prime_lock_class;
struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj)
+3
View File
@@ -9,6 +9,7 @@
#include <linux/dma-buf.h>
#include <linux/pfn_t.h>
#include <linux/shmem_fs.h>
#include <linux/module.h>
#include <drm/drm_prime.h>
#include <drm/drm_vma_manager.h>
@@ -17,6 +18,8 @@
#include "exynos_drm_drv.h"
#include "exynos_drm_gem.h"
MODULE_IMPORT_NS(DMA_BUF);
static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem, bool kvmap)
{
struct drm_device *dev = exynos_gem->base.dev;
@@ -7,11 +7,14 @@
#include <linux/dma-buf.h>
#include <linux/highmem.h>
#include <linux/dma-resv.h>
#include <linux/module.h>
#include "i915_drv.h"
#include "i915_gem_object.h"
#include "i915_scatterlist.h"
MODULE_IMPORT_NS(DMA_BUF);
I915_SELFTEST_DECLARE(static bool force_different_devices;)
static struct drm_i915_gem_object *dma_buf_to_obj(struct dma_buf *buf)
@@ -11,6 +11,8 @@
#include "omap_drv.h"
MODULE_IMPORT_NS(DMA_BUF);
/* -----------------------------------------------------------------------------
* DMABUF Export
*/
+3
View File
@@ -12,6 +12,7 @@
#include <linux/dma-buf.h>
#include <linux/iommu.h>
#include <linux/module.h>
#include <drm/drm_drv.h>
#include <drm/drm_prime.h>
@@ -20,6 +21,8 @@
#include "drm.h"
#include "gem.h"
MODULE_IMPORT_NS(DMA_BUF);
static void tegra_bo_put(struct host1x_bo *bo)
{
struct tegra_bo *obj = host1x_to_tegra_bo(bo);
+3
View File
@@ -48,8 +48,11 @@
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/atomic.h>
#include <linux/module.h>
#include "ttm_object.h"
MODULE_IMPORT_NS(DMA_BUF);
/**
* struct ttm_object_file
*