From 317e7bb75862eb7e7272271435a6387a4f5c9839 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 5 Nov 2014 11:21:03 +0200 Subject: gpu: nvgpu: gp10b: Fill class numbers Fill class numbers to characteristics structure. Bug 1567274 Change-Id: I129e79fa3f850899ae0c7d93704dc4786ad514d9 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/594404 Reviewed-by: Automatic_Commit_Validation_User --- drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 13 ++++++++++++- drivers/gpu/nvgpu/gp10b/hal_gp10b.h | 4 ++-- drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 235254c8..067c9bf4 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -23,6 +23,7 @@ #include "gp10b/gr_gp10b.h" #include "gp10b/mc_gp10b.h" +#include "gm20b/gr_gm20b.h" #include "gm20b/ltc_gm20b.h" #include "gm20b/fb_gm20b.h" #include "gm20b/gm20b_gating_reglist.h" @@ -81,8 +82,11 @@ struct gpu_ops gp10b_ops = { } }; -int gp10b_init_hal(struct gpu_ops *gops) +int gp10b_init_hal(struct gk20a *g) { + struct gpu_ops *gops = &g->ops; + struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; + *gops = gp10b_ops; gp10b_init_mc(gops); gm20b_init_ltc(gops); @@ -96,5 +100,12 @@ int gp10b_init_hal(struct gpu_ops *gops) gm20b_init_clk_ops(gops); gops->name = "gp10b"; + c->twod_class = FERMI_TWOD_A; + c->threed_class = PASCAL_A; + c->compute_class = PASCAL_COMPUTE_A; + c->gpfifo_class = MAXWELL_CHANNEL_GPFIFO_A; + c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_B; + c->dma_copy_class = MAXWELL_DMA_COPY_A; + return 0; } diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.h b/drivers/gpu/nvgpu/gp10b/hal_gp10b.h index 78615ed1..0b464d07 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.h @@ -15,7 +15,7 @@ #ifndef _NVGPU_HAL_GP10B_H #define _NVGPU_HAL_GP10B_H -struct gpu_ops; +struct gk20a; -int gp10b_init_hal(struct gpu_ops *gops); +int gp10b_init_hal(struct gk20a *gops); #endif diff --git a/drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h b/drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h index ac65af18..59ecefee 100644 --- a/drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h +++ b/drivers/gpu/nvgpu/nvgpu_gpuid_t18x.h @@ -26,6 +26,6 @@ #define TEGRA_18x_GPU_COMPAT_TEGRA NVGPU_COMPAT_TEGRA_GP10B #define TEGRA_18x_GPU_COMPAT_GENERIC NVGPU_COMPAT_GENERIC_GP10B struct gpu_ops; -extern int gp10b_init_hal(struct gpu_ops *); +extern int gp10b_init_hal(struct gk20a *); extern struct gk20a_platform t18x_gpu_tegra_platform; #endif -- cgit v1.2.2