summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h3
-rw-r--r--drivers/gpu/nvgpu/gk20a/hal.c6
-rw-r--r--drivers/gpu/nvgpu/gk20a/hal_gk20a.c12
-rw-r--r--drivers/gpu/nvgpu/gk20a/hal_gk20a.h3
-rw-r--r--drivers/gpu/nvgpu/gk20a/ltc_gk20a.h2
5 files changed, 18 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index e3392ae8..a56614ab 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -700,7 +700,8 @@ enum {
700 FERMI_TWOD_A = 0x902D, 700 FERMI_TWOD_A = 0x902D,
701 KEPLER_COMPUTE_A = 0xA0C0, 701 KEPLER_COMPUTE_A = 0xA0C0,
702 KEPLER_INLINE_TO_MEMORY_A = 0xA040, 702 KEPLER_INLINE_TO_MEMORY_A = 0xA040,
703 KEPLER_DMA_COPY_A = 0xA0B5, /*not sure about this one*/ 703 KEPLER_DMA_COPY_A = 0xA0B5,
704 KEPLER_CHANNEL_GPFIFO_C = 0xA26F,
704}; 705};
705 706
706static inline int support_gk20a_pmu(struct platform_device *dev) 707static inline int support_gk20a_pmu(struct platform_device *dev)
diff --git a/drivers/gpu/nvgpu/gk20a/hal.c b/drivers/gpu/nvgpu/gk20a/hal.c
index 56553819..10607af0 100644
--- a/drivers/gpu/nvgpu/gk20a/hal.c
+++ b/drivers/gpu/nvgpu/gk20a/hal.c
@@ -27,16 +27,16 @@ int gpu_init_hal(struct gk20a *g)
27 switch (ver) { 27 switch (ver) {
28 case GK20A_GPUID_GK20A: 28 case GK20A_GPUID_GK20A:
29 gk20a_dbg_info("gk20a detected"); 29 gk20a_dbg_info("gk20a detected");
30 gk20a_init_hal(&g->ops); 30 gk20a_init_hal(g);
31 break; 31 break;
32 case GK20A_GPUID_GM20B: 32 case GK20A_GPUID_GM20B:
33 gk20a_dbg_info("gm20b detected"); 33 gk20a_dbg_info("gm20b detected");
34 if (gm20b_init_hal(&g->ops)) 34 if (gm20b_init_hal(g))
35 return -ENODEV; 35 return -ENODEV;
36 break; 36 break;
37#if defined(CONFIG_ARCH_TEGRA_18x_SOC) 37#if defined(CONFIG_ARCH_TEGRA_18x_SOC)
38 case TEGRA_18x_GPUID: 38 case TEGRA_18x_GPUID:
39 if (TEGRA_18x_GPUID_HAL(&g->ops)) 39 if (TEGRA_18x_GPUID_HAL(g))
40 return -ENODEV; 40 return -ENODEV;
41 break; 41 break;
42#endif 42#endif
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}
diff --git a/drivers/gpu/nvgpu/gk20a/hal_gk20a.h b/drivers/gpu/nvgpu/gk20a/hal_gk20a.h
index db77a4a7..f214432a 100644
--- a/drivers/gpu/nvgpu/gk20a/hal_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/hal_gk20a.h
@@ -20,9 +20,8 @@
20 20
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22 22
23struct gpu_ops;
24struct gk20a; 23struct gk20a;
25 24
26int gk20a_init_hal(struct gpu_ops *gops); 25int gk20a_init_hal(struct gk20a *g);
27 26
28#endif /* __HAL_GK20A__ */ 27#endif /* __HAL_GK20A__ */
diff --git a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.h b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.h
index df7dc9e4..3cace0fd 100644
--- a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.h
@@ -15,7 +15,7 @@
15 15
16#ifndef LTC_GK20A_H 16#ifndef LTC_GK20A_H
17#define LTC_GK20A_H 17#define LTC_GK20A_H
18struct gk20a; 18struct gpu_ops;
19 19
20void gk20a_init_ltc(struct gpu_ops *gops); 20void gk20a_init_ltc(struct gpu_ops *gops);
21#endif 21#endif