diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/hal.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/hal_gk20a.c | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/hal_gk20a.h | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ltc_gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.h | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.c | 2 |
9 files changed, 37 insertions, 15 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 | ||
706 | static inline int support_gk20a_pmu(struct platform_device *dev) | 707 | static 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 | ||
48 | int gk20a_init_hal(struct gpu_ops *gops) | 48 | int 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 | ||
23 | struct gpu_ops; | ||
24 | struct gk20a; | 23 | struct gk20a; |
25 | 24 | ||
26 | int gk20a_init_hal(struct gpu_ops *gops); | 25 | int 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 |
18 | struct gk20a; | 18 | struct gpu_ops; |
19 | 19 | ||
20 | void gk20a_init_ltc(struct gpu_ops *gops); | 20 | void gk20a_init_ltc(struct gpu_ops *gops); |
21 | #endif | 21 | #endif |
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.h b/drivers/gpu/nvgpu/gm20b/gr_gm20b.h index 8348b9d9..470e5bae 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.h | |||
@@ -18,9 +18,11 @@ | |||
18 | struct gk20a; | 18 | struct gk20a; |
19 | 19 | ||
20 | enum { | 20 | enum { |
21 | MAXWELL_B = 0xB197, | 21 | MAXWELL_B = 0xB197, |
22 | MAXWELL_COMPUTE_B = 0xB1C0, | 22 | MAXWELL_COMPUTE_B = 0xB1C0, |
23 | MAXWELL_DMA_COPY_A = 0xB0B5, | 23 | KEPLER_INLINE_TO_MEMORY_B= 0xA140, |
24 | MAXWELL_DMA_COPY_A = 0xB0B5, | ||
25 | MAXWELL_CHANNEL_GPFIFO_A= 0xB06F, | ||
24 | }; | 26 | }; |
25 | 27 | ||
26 | #define NVB197_SET_ALPHA_CIRCULAR_BUFFER_SIZE 0x02dc | 28 | #define NVB197_SET_ALPHA_CIRCULAR_BUFFER_SIZE 0x02dc |
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 = { | |||
83 | } | 83 | } |
84 | }; | 84 | }; |
85 | 85 | ||
86 | int gm20b_init_hal(struct gpu_ops *gops) | 86 | int gm20b_init_hal(struct gk20a *g) |
87 | { | 87 | { |
88 | struct gpu_ops *gops = &g->ops; | ||
89 | struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; | ||
90 | |||
88 | *gops = gm20b_ops; | 91 | *gops = gm20b_ops; |
89 | #ifdef CONFIG_TEGRA_ACR | 92 | #ifdef CONFIG_TEGRA_ACR |
90 | if (tegra_platform_is_linsim()) { | 93 | if (tegra_platform_is_linsim()) { |
@@ -127,5 +130,12 @@ int gm20b_init_hal(struct gpu_ops *gops) | |||
127 | gm20b_init_regops(gops); | 130 | gm20b_init_regops(gops); |
128 | gops->name = "gm20b"; | 131 | gops->name = "gm20b"; |
129 | 132 | ||
133 | c->twod_class = FERMI_TWOD_A; | ||
134 | c->threed_class = MAXWELL_B; | ||
135 | c->compute_class = MAXWELL_COMPUTE_B; | ||
136 | c->gpfifo_class = MAXWELL_CHANNEL_GPFIFO_A; | ||
137 | c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_B; | ||
138 | c->dma_copy_class = MAXWELL_DMA_COPY_A; | ||
139 | |||
130 | return 0; | 140 | return 0; |
131 | } | 141 | } |
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.h b/drivers/gpu/nvgpu/gm20b/hal_gm20b.h index 99e193fc..2416876d 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #ifndef _NVHOST_HAL_GM20B_H | 16 | #ifndef _NVHOST_HAL_GM20B_H |
17 | #define _NVHOST_HAL_GM20B_H | 17 | #define _NVHOST_HAL_GM20B_H |
18 | struct gpu_ops; | 18 | struct gk20a; |
19 | 19 | ||
20 | int gm20b_init_hal(struct gpu_ops *gops); | 20 | int gm20b_init_hal(struct gk20a *g); |
21 | #endif | 21 | #endif |
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 82a0851e..f9b97d97 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c | |||
@@ -242,7 +242,7 @@ static int vgpu_init_hal(struct gk20a *g) | |||
242 | case GK20A_GPUID_GK20A: | 242 | case GK20A_GPUID_GK20A: |
243 | gk20a_dbg_info("gk20a detected"); | 243 | gk20a_dbg_info("gk20a detected"); |
244 | /* init gk20a ops then override with virt extensions */ | 244 | /* init gk20a ops then override with virt extensions */ |
245 | gk20a_init_hal(&g->ops); | 245 | gk20a_init_hal(g); |
246 | vgpu_init_fifo_ops(&g->ops); | 246 | vgpu_init_fifo_ops(&g->ops); |
247 | vgpu_init_gr_ops(&g->ops); | 247 | vgpu_init_gr_ops(&g->ops); |
248 | vgpu_init_ltc_ops(&g->ops); | 248 | vgpu_init_ltc_ops(&g->ops); |