From ccba95757033292d881671e575aed5e0feb61dc3 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Thu, 7 Apr 2016 15:35:51 -0700 Subject: gpu: nvgpu: add support for t19x Add build and gpu framework support for t19x. Bug 1735757 Change-Id: I4b7c6468871ca27412a6f9be20f744bc730b4142 Signed-off-by: Seshendra Gadagottu Reviewed-on: http://git-master/r/1122093 GVS: Gerrit_Virtual_Submit Reviewed-by: Ken Adams --- drivers/gpu/nvgpu/Makefile | 10 ++++++++++ drivers/gpu/nvgpu/gk20a/hal.c | 10 ++++++++++ 2 files changed, 20 insertions(+) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index 1d712d57..8cd5cc7c 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile @@ -15,6 +15,12 @@ ccflags-y += -I$(srctree)/../kernel-nvgpu-t18x/include ccflags-y += -I$(srctree)/../kernel-nvgpu-t18x/include/uapi 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 nvgpu-y := \ @@ -100,3 +106,7 @@ nvgpu-$(CONFIG_GK20A_CYCLE_STATS) += \ ifeq ($(CONFIG_ARCH_TEGRA_18x_SOC),y) include ../kernel-nvgpu-t18x/drivers/gpu/nvgpu/Makefile endif + +ifeq ($(CONFIG_ARCH_TEGRA_19x_SOC),y) +include ../kernel-nvgpu-t19x/drivers/gpu/nvgpu/Makefile +endif diff --git a/drivers/gpu/nvgpu/gk20a/hal.c b/drivers/gpu/nvgpu/gk20a/hal.c index 7755bf7d..16ba4a03 100644 --- a/drivers/gpu/nvgpu/gk20a/hal.c +++ b/drivers/gpu/nvgpu/gk20a/hal.c @@ -21,6 +21,10 @@ #include "nvgpu_gpuid_t18x.h" #endif +#ifdef CONFIG_ARCH_TEGRA_19x_SOC +#include "nvgpu_gpuid_t19x.h" +#endif + int gpu_init_hal(struct gk20a *g) { 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)) return -ENODEV; break; +#endif +#if defined(CONFIG_ARCH_TEGRA_19x_SOC) + case TEGRA_19x_GPUID: + if (TEGRA_19x_GPUID_HAL(g)) + return -ENODEV; + break; #endif default: gk20a_err(g->dev, "no support for %x", ver); -- cgit v1.2.2