From 2c23d1066f947e697240f5e61529c5b48407fa08 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 5 Nov 2014 10:12:17 +0200 Subject: gpu: nvgpu: Add class numbers to characteristics Some kernel APIs rely on user space knowing class numbers. Allow querying the numbers from kernel. Bug 1567274 Change-Id: Idec2fe8ee983ee74bcbf9dfc98f71bbcc1492cfb Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/594402 --- drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gm20b/hal_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 2b534816..e95f8878 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c @@ -83,8 +83,11 @@ static struct gpu_ops gm20b_ops = { } }; -int gm20b_init_hal(struct gpu_ops *gops) +int gm20b_init_hal(struct gk20a *g) { + struct gpu_ops *gops = &g->ops; + struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; + *gops = gm20b_ops; #ifdef CONFIG_TEGRA_ACR if (tegra_platform_is_linsim()) { @@ -127,5 +130,12 @@ int gm20b_init_hal(struct gpu_ops *gops) gm20b_init_regops(gops); gops->name = "gm20b"; + c->twod_class = FERMI_TWOD_A; + c->threed_class = MAXWELL_B; + c->compute_class = MAXWELL_COMPUTE_B; + 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; } -- cgit v1.2.2