gpu: nvgpu: add support for t19x

Add build and gpu framework support for t19x.

Bug 1735757

Change-Id: I4b7c6468871ca27412a6f9be20f744bc730b4142
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/1122093
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ken Adams <kadams@nvidia.com>
This commit is contained in:
Seshendra Gadagottu
2016-04-07 15:35:51 -07:00
committed by Ken Adams
parent 2a57c10e4b
commit ccba957570
3 changed files with 24 additions and 0 deletions

View File

@@ -15,6 +15,12 @@ ccflags-y += -I$(srctree)/../kernel-nvgpu-t18x/include
ccflags-y += -I$(srctree)/../kernel-nvgpu-t18x/include/uapi ccflags-y += -I$(srctree)/../kernel-nvgpu-t18x/include/uapi
endif endif
ifeq ($(CONFIG_ARCH_TEGRA_19x_SOC),y)
ccflags-y += -I$(srctree)/../kernel-nvgpu-t19x/drivers/gpu/nvgpu
ccflags-y += -I$(srctree)/../kernel-nvgpu-t19x/include
ccflags-y += -I$(srctree)/../kernel-nvgpu-t19x/include/uapi
endif
obj-$(CONFIG_GK20A) := nvgpu.o obj-$(CONFIG_GK20A) := nvgpu.o
nvgpu-y := \ nvgpu-y := \
@@ -100,3 +106,7 @@ nvgpu-$(CONFIG_GK20A_CYCLE_STATS) += \
ifeq ($(CONFIG_ARCH_TEGRA_18x_SOC),y) ifeq ($(CONFIG_ARCH_TEGRA_18x_SOC),y)
include ../kernel-nvgpu-t18x/drivers/gpu/nvgpu/Makefile include ../kernel-nvgpu-t18x/drivers/gpu/nvgpu/Makefile
endif endif
ifeq ($(CONFIG_ARCH_TEGRA_19x_SOC),y)
include ../kernel-nvgpu-t19x/drivers/gpu/nvgpu/Makefile
endif

View File

@@ -21,6 +21,10 @@
#include "nvgpu_gpuid_t18x.h" #include "nvgpu_gpuid_t18x.h"
#endif #endif
#ifdef CONFIG_ARCH_TEGRA_19x_SOC
#include "nvgpu_gpuid_t19x.h"
#endif
int gpu_init_hal(struct gk20a *g) int gpu_init_hal(struct gk20a *g)
{ {
u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl;
@@ -39,6 +43,12 @@ int gpu_init_hal(struct gk20a *g)
if (TEGRA_18x_GPUID_HAL(g)) if (TEGRA_18x_GPUID_HAL(g))
return -ENODEV; return -ENODEV;
break; break;
#endif
#if defined(CONFIG_ARCH_TEGRA_19x_SOC)
case TEGRA_19x_GPUID:
if (TEGRA_19x_GPUID_HAL(g))
return -ENODEV;
break;
#endif #endif
default: default:
gk20a_err(g->dev, "no support for %x", ver); gk20a_err(g->dev, "no support for %x", ver);

View File

@@ -92,6 +92,10 @@ struct nvgpu_gpu_zbc_query_table_args {
#include <linux/nvgpu-t18x.h> #include <linux/nvgpu-t18x.h>
#endif #endif
#ifdef CONFIG_ARCH_TEGRA_19x_SOC
#include <linux/nvgpu-t19x.h>
#endif
#define NVGPU_GPU_BUS_TYPE_NONE 0 #define NVGPU_GPU_BUS_TYPE_NONE 0
#define NVGPU_GPU_BUS_TYPE_AXI 32 #define NVGPU_GPU_BUS_TYPE_AXI 32