mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
misc: mods: import module DMA_BUF if needed
Bug 4036660 Change-Id: I687d582151615b50d7402d26d2f64fe604fc1d7c Signed-off-by: Chris Dragan <kdragan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2890935 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
5535897d3d
commit
50850d5851
@@ -20,6 +20,7 @@ mods-$(CONFIG_TEGRA_IVC) += mods_bpmpipc.o
|
|||||||
mods-$(CONFIG_COMMON_CLK) += mods_clock.o
|
mods-$(CONFIG_COMMON_CLK) += mods_clock.o
|
||||||
mods-$(CONFIG_DEBUG_FS) += mods_debugfs.o
|
mods-$(CONFIG_DEBUG_FS) += mods_debugfs.o
|
||||||
mods-$(CONFIG_DMA_ENGINE) += mods_dma.o
|
mods-$(CONFIG_DMA_ENGINE) += mods_dma.o
|
||||||
|
mods-$(CONFIG_DMA_SHARED_BUFFER) += mods_dmabuf.o
|
||||||
mods-$(CONFIG_ARCH_TEGRA) += mods_ipi.o
|
mods-$(CONFIG_ARCH_TEGRA) += mods_ipi.o
|
||||||
mods-$(CONFIG_NET) += mods_netdevice.o
|
mods-$(CONFIG_NET) += mods_netdevice.o
|
||||||
mods-$(CONFIG_ARCH_TEGRA) += mods_oist.o
|
mods-$(CONFIG_ARCH_TEGRA) += mods_oist.o
|
||||||
@@ -33,8 +34,6 @@ mods-$(CONFIG_TRUSTY) += mods_tz.o
|
|||||||
mods-objs := mods.dtb.o
|
mods-objs := mods.dtb.o
|
||||||
|
|
||||||
ifneq ($(CONFIG_TEGRA_OOT_MODULE),m)
|
ifneq ($(CONFIG_TEGRA_OOT_MODULE),m)
|
||||||
ccflags-y += -DMODS_HAS_DMABUF
|
|
||||||
ccflags-y += -DMODS_HAS_PROD
|
ccflags-y += -DMODS_HAS_PROD
|
||||||
mods-$(CONFIG_DMA_SHARED_BUFFER) += mods_dmabuf.o
|
|
||||||
mods-$(CONFIG_ARCH_TEGRA) += mods_tegraprod.o
|
mods-$(CONFIG_ARCH_TEGRA) += mods_tegraprod.o
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of NVIDIA MODS kernel driver.
|
* This file is part of NVIDIA MODS kernel driver.
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* NVIDIA MODS kernel driver is free software: you can redistribute it and/or
|
* NVIDIA MODS kernel driver is free software: you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License,
|
* modify it under the terms of the GNU General Public License,
|
||||||
@@ -25,6 +25,10 @@
|
|||||||
|
|
||||||
#include "mods_internal.h"
|
#include "mods_internal.h"
|
||||||
|
|
||||||
|
#if KERNEL_VERSION(5, 4, 0) <= MODS_KERNEL_VERSION
|
||||||
|
MODULE_IMPORT_NS(DMA_BUF);
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct device *dummy_device;
|
static struct device *dummy_device;
|
||||||
|
|
||||||
static bool dummy_device_registered;
|
static bool dummy_device_registered;
|
||||||
|
|||||||
@@ -671,7 +671,7 @@ int esc_mods_net_force_link(struct mods_client *client,
|
|||||||
struct MODS_NET_DEVICE_NAME *p);
|
struct MODS_NET_DEVICE_NAME *p);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MODS_HAS_DMABUF) && defined(CONFIG_DMA_SHARED_BUFFER)
|
#if defined(MODS_HAS_TEGRA) && defined(CONFIG_DMA_SHARED_BUFFER)
|
||||||
int esc_mods_dmabuf_get_phys_addr(struct mods_client *client,
|
int esc_mods_dmabuf_get_phys_addr(struct mods_client *client,
|
||||||
struct MODS_DMABUF_GET_PHYSICAL_ADDRESS *p);
|
struct MODS_DMABUF_GET_PHYSICAL_ADDRESS *p);
|
||||||
#else
|
#else
|
||||||
@@ -735,7 +735,7 @@ static inline int mods_create_debugfs(struct miscdevice *modsdev)
|
|||||||
static inline void mods_remove_debugfs(void) {}
|
static inline void mods_remove_debugfs(void) {}
|
||||||
#endif /* CONFIG_DEBUG_FS */
|
#endif /* CONFIG_DEBUG_FS */
|
||||||
|
|
||||||
#if defined(MODS_HAS_DMABUF) && defined(CONFIG_DMA_SHARED_BUFFER)
|
#if defined(MODS_HAS_TEGRA) && defined(CONFIG_DMA_SHARED_BUFFER)
|
||||||
int mods_init_dmabuf(void);
|
int mods_init_dmabuf(void);
|
||||||
void mods_exit_dmabuf(void);
|
void mods_exit_dmabuf(void);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -2656,7 +2656,7 @@ static long mods_krnl_ioctl(struct file *fp,
|
|||||||
MODS_FLUSH_CPU_CACHE_RANGE);
|
MODS_FLUSH_CPU_CACHE_RANGE);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if defined(MODS_HAS_DMABUF)
|
#if defined(MODS_HAS_TEGRA) && defined(CONFIG_DMA_SHARED_BUFFER)
|
||||||
case MODS_ESC_DMABUF_GET_PHYSICAL_ADDRESS:
|
case MODS_ESC_DMABUF_GET_PHYSICAL_ADDRESS:
|
||||||
MODS_IOCTL(MODS_ESC_DMABUF_GET_PHYSICAL_ADDRESS,
|
MODS_IOCTL(MODS_ESC_DMABUF_GET_PHYSICAL_ADDRESS,
|
||||||
esc_mods_dmabuf_get_phys_addr,
|
esc_mods_dmabuf_get_phys_addr,
|
||||||
|
|||||||
Reference in New Issue
Block a user