Skip to content

Commit

Permalink
nvdla: Support compilation as module
Browse files Browse the repository at this point in the history
Signed-off-by: Emil Renner Berthing <[email protected]>
  • Loading branch information
esmil committed Dec 27, 2021
1 parent 97b488e commit c12f9d9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
3 changes: 1 addition & 2 deletions drivers/nvdla/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
config NVDLA
bool "The NVIDIA Deep Learning Accelerator"
default n
tristate "The NVIDIA Deep Learning Accelerator"
depends on DRM
select DRM_GEM_CMA_HELPER
36 changes: 19 additions & 17 deletions drivers/nvdla/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@

ccflags-$(CONFIG_NVDLA) += -I$(srctree)/$(src)
ccflags-$(CONFIG_NVDLA) += -I$(srctree)/$(src)/include
ccflags-y += -I$(srctree)/$(src)
ccflags-y += -I$(srctree)/$(src)/include

obj-$(CONFIG_NVDLA) += scheduler.o
obj-$(CONFIG_NVDLA) += engine.o
obj-$(CONFIG_NVDLA) += bdma.o
obj-$(CONFIG_NVDLA) += conv.o
obj-$(CONFIG_NVDLA) += sdp.o
obj-$(CONFIG_NVDLA) += cdp.o
obj-$(CONFIG_NVDLA) += pdp.o
obj-$(CONFIG_NVDLA) += rubik.o
obj-$(CONFIG_NVDLA) += cache.o
obj-$(CONFIG_NVDLA) += common.o
obj-$(CONFIG_NVDLA) += engine_data.o
obj-$(CONFIG_NVDLA) += engine_isr.o
obj-$(CONFIG_NVDLA) += engine_debug.o
obj-$(CONFIG_NVDLA) += nvdla_core_callbacks.o
obj-$(CONFIG_NVDLA) += nvdla_gem.o
nvdla-y := scheduler.o \
engine.o \
bdma.o \
conv.o \
sdp.o \
cdp.o \
pdp.o \
rubik.o \
cache.o \
common.o \
engine_data.o \
engine_isr.o \
engine_debug.o \
nvdla_core_callbacks.o \
nvdla_gem.o

obj-$(CONFIG_NVDLA) += nvdla.o
2 changes: 2 additions & 0 deletions drivers/nvdla/nvdla_core_callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,5 @@ module_platform_driver(nvdla_driver);
MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("NVIDIA");
MODULE_DESCRIPTION("Nvidia Deep Learning Accelerator driver");

MODULE_IMPORT_NS(DMA_BUF);
1 change: 1 addition & 0 deletions kernel/dma/coherent.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
dma_release_coherent_memory(mem);
return ret;
}
EXPORT_SYMBOL_GPL(dma_declare_coherent_memory);

static void *__dma_alloc_from_coherent(struct device *dev,
struct dma_coherent_mem *mem,
Expand Down

0 comments on commit c12f9d9

Please sign in to comment.