summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/hal_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-11-05 03:12:17 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:06 -0400
commit2c23d1066f947e697240f5e61529c5b48407fa08 (patch)
tree6f9bebc525a516d19ded1e3e7ae4b6067953e8b8 /drivers/gpu/nvgpu/gk20a/hal_gk20a.c
parent88c760b2eac861298535dac6df89b8a14152efe9 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/594402
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/hal_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/hal_gk20a.c12
1 files changed, 11 insertions, 1 deletions
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 = {
45 } 45 }
46}; 46};
47 47
48int gk20a_init_hal(struct gpu_ops *gops) 48int gk20a_init_hal(struct gk20a *g)
49{ 49{
50 struct gpu_ops *gops = &g->ops;
51 struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics;
52
50 *gops = gk20a_ops; 53 *gops = gk20a_ops;
51 gops->privsecurity = 0; 54 gops->privsecurity = 0;
52 gk20a_init_mc(gops); 55 gk20a_init_mc(gops);
@@ -61,5 +64,12 @@ int gk20a_init_hal(struct gpu_ops *gops)
61 gk20a_init_regops(gops); 64 gk20a_init_regops(gops);
62 gops->name = "gk20a"; 65 gops->name = "gk20a";
63 66
67 c->twod_class = FERMI_TWOD_A;
68 c->threed_class = KEPLER_C;
69 c->compute_class = KEPLER_COMPUTE_A;
70 c->gpfifo_class = KEPLER_CHANNEL_GPFIFO_C;
71 c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_A;
72 c->dma_copy_class = KEPLER_DMA_COPY_A;
73
64 return 0; 74 return 0;
65} 75}