gpu: nvgpu: Allow module build

This patch makes the necessary modifications to the gk20a driver to
allow building it as a module.

Bug 1476801

Change-Id: I88c4e1c1867baa1c2d010ac6e0c30bdb5fd63b91
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-on: http://git-master/r/380970
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Lauri Peltonen
2014-03-12 18:44:55 +02:00
committed by Dan Willemsen
parent ac0d81831a
commit 4295256967
2 changed files with 18 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
config GK20A config GK20A
bool "Nvidia GK20A GPU support" tristate "Nvidia GK20A GPU support"
default y
help help
Choose this option if you have an SoC with integrated Choose this option if you have an SoC with integrated
Nvidia GPU IP. Nvidia GPU IP.
@@ -54,7 +55,18 @@ config GK20A_CYCLE_STATS
config GK20A_PHYS_PAGE_TABLES config GK20A_PHYS_PAGE_TABLES
bool "Use physical addressing for gk20a page tables" bool "Use physical addressing for gk20a page tables"
depends on GK20A
default y if TEGRA_SIMULATION_PLATFORM default y if TEGRA_SIMULATION_PLATFORM
help help
Use physical addressing for gk20a page tables. If this is off, we Use physical addressing for gk20a page tables. If this is off, we
use SMMU translation. use SMMU translation.
config TEGRA_GK20A
bool "Enable the GK20A GPU on Tegra"
depends on TEGRA_GRHOST
depends on GK20A
default y
help
Enable support for the GK20A graphics engine on Tegra
by adding a Tegra platfrom interface to the GK20A driver.
The Tegra platform interface requires TEGRA_GRHOST (host1x).

View File

@@ -4,7 +4,7 @@ ccflags-y += -Idrivers/devfreq
ccflags-y += -Wno-multichar ccflags-y += -Wno-multichar
ccflags-y += -Werror ccflags-y += -Werror
obj-$(CONFIG_GK20A) += \ nvgpu-y := \
gk20a.o \ gk20a.o \
as_gk20a.o \ as_gk20a.o \
ctrl_gk20a.o \ ctrl_gk20a.o \
@@ -30,7 +30,8 @@ obj-$(CONFIG_GK20A) += \
fb_gk20a.o \ fb_gk20a.o \
hal.o \ hal.o \
hal_gk20a.o \ hal_gk20a.o \
gk20a_allocator.o gk20a_allocator.o \
platform_gk20a_generic.o
nvgpu-$(CONFIG_TEGRA_GK20A) += platform_gk20a_tegra.o
obj-$(CONFIG_GK20A) += platform_gk20a_generic.o obj-$(CONFIG_GK20A) := nvgpu.o
obj-$(CONFIG_TEGRA_GK20A) += platform_gk20a_tegra.o