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/gk20a/hal_gk20a.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/hal_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/hal_gk20a.c b/drivers/gpu/nvgpu/gk20a/hal_gk20a.c index 7000f682..ada2f034 100644 --- a/drivers/gpu/nvgpu/gk20a/hal_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/hal_gk20a.c @@ -45,8 +45,11 @@ static struct gpu_ops gk20a_ops = { } }; -int gk20a_init_hal(struct gpu_ops *gops) +int gk20a_init_hal(struct gk20a *g) { + struct gpu_ops *gops = &g->ops; + struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; + *gops = gk20a_ops; gops->privsecurity = 0; gk20a_init_mc(gops); @@ -61,5 +64,12 @@ int gk20a_init_hal(struct gpu_ops *gops) gk20a_init_regops(gops); gops->name = "gk20a"; + c->twod_class = FERMI_TWOD_A; + c->threed_class = KEPLER_C; + c->compute_class = KEPLER_COMPUTE_A; + c->gpfifo_class = KEPLER_CHANNEL_GPFIFO_C; + c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_A; + c->dma_copy_class = KEPLER_DMA_COPY_A; + return 0; } -- cgit v1.2.2