diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-01-16 12:15:20 -0500 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:52:03 -0500 |
commit | eff1aa4d9212f76f24d362bc1f871bf82baa5d98 (patch) | |
tree | 44a218d9e293beee1077a8a0071fda27e724d1da | |
parent | 7b70eb224a008b5debd1a6220d7835d6ebef70a0 (diff) |
gpu: nvgpu: gp10b: Set correct PBDMA signature
GPFIFO class was set to Maxwell class number. Also implement the
PBDMA signature HAL.
Change-Id: Ieaebcda8af96d5779289b311c0c433e8b4349234
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/672921
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/Makefile | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/fifo_gp10b.c | 32 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/fifo_gp10b.h | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 5 |
4 files changed, 54 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/Makefile b/drivers/gpu/nvgpu/gp10b/Makefile index e897ab9c..e14cd0ee 100644 --- a/drivers/gpu/nvgpu/gp10b/Makefile +++ b/drivers/gpu/nvgpu/gp10b/Makefile | |||
@@ -17,6 +17,7 @@ obj-$(CONFIG_GK20A) += \ | |||
17 | mm_gp10b.o \ | 17 | mm_gp10b.o \ |
18 | fb_gp10b.o \ | 18 | fb_gp10b.o \ |
19 | pmu_gp10b.o \ | 19 | pmu_gp10b.o \ |
20 | fifo_gp10b.o \ | ||
20 | hal_gp10b.o | 21 | hal_gp10b.o |
21 | 22 | ||
22 | obj-$(CONFIG_TEGRA_GK20A) += platform_gp10b_tegra.o | 23 | obj-$(CONFIG_TEGRA_GK20A) += platform_gp10b_tegra.o |
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c new file mode 100644 index 00000000..d67c7ee2 --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * GP10B fifo | ||
3 | * | ||
4 | * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms and conditions of the GNU General Public License, | ||
8 | * version 2, as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | */ | ||
15 | |||
16 | #include <linux/types.h> | ||
17 | |||
18 | #include "gk20a/gk20a.h" | ||
19 | #include "gm20b/fifo_gm20b.h" | ||
20 | #include "hw_pbdma_gp10b.h" | ||
21 | |||
22 | static u32 gp10b_fifo_get_pbdma_signature(struct gk20a *g) | ||
23 | { | ||
24 | return g->gpu_characteristics.gpfifo_class | ||
25 | | pbdma_signature_sw_zero_f(); | ||
26 | } | ||
27 | |||
28 | void gp10b_init_fifo(struct gpu_ops *gops) | ||
29 | { | ||
30 | gm20b_init_fifo(gops); | ||
31 | gops->fifo.get_pbdma_signature = gp10b_fifo_get_pbdma_signature; | ||
32 | } | ||
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.h b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.h new file mode 100644 index 00000000..18e2034f --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | */ | ||
13 | |||
14 | #ifndef FIFO_GP10B_H | ||
15 | #define FIFO_GP10B_H | ||
16 | struct gpu_ops; | ||
17 | void gp10b_init_fifo(struct gpu_ops *gops); | ||
18 | #endif | ||
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 1a34688a..30b56a5c 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "gm20b/gr_gm20b.h" | 31 | #include "gm20b/gr_gm20b.h" |
32 | #include "gm20b/gm20b_gating_reglist.h" | 32 | #include "gm20b/gm20b_gating_reglist.h" |
33 | #include "gm20b/fifo_gm20b.h" | 33 | #include "gm20b/fifo_gm20b.h" |
34 | #include "gp10b/fifo_gp10b.h" | ||
34 | #include "gm20b/pmu_gm20b.h" | 35 | #include "gm20b/pmu_gm20b.h" |
35 | #include "gm20b/clk_gm20b.h" | 36 | #include "gm20b/clk_gm20b.h" |
36 | 37 | ||
@@ -93,7 +94,7 @@ int gp10b_init_hal(struct gk20a *g) | |||
93 | gp10b_init_gr(gops); | 94 | gp10b_init_gr(gops); |
94 | gp10b_init_ltc(gops); | 95 | gp10b_init_ltc(gops); |
95 | gp10b_init_fb(gops); | 96 | gp10b_init_fb(gops); |
96 | gm20b_init_fifo(gops); | 97 | gp10b_init_fifo(gops); |
97 | gp10b_init_gr_ctx(gops); | 98 | gp10b_init_gr_ctx(gops); |
98 | gp10b_init_mm(gops); | 99 | gp10b_init_mm(gops); |
99 | gp10b_init_pmu_ops(gops); | 100 | gp10b_init_pmu_ops(gops); |
@@ -104,7 +105,7 @@ int gp10b_init_hal(struct gk20a *g) | |||
104 | c->twod_class = FERMI_TWOD_A; | 105 | c->twod_class = FERMI_TWOD_A; |
105 | c->threed_class = PASCAL_A; | 106 | c->threed_class = PASCAL_A; |
106 | c->compute_class = PASCAL_COMPUTE_A; | 107 | c->compute_class = PASCAL_COMPUTE_A; |
107 | c->gpfifo_class = MAXWELL_CHANNEL_GPFIFO_A; | 108 | c->gpfifo_class = PASCAL_CHANNEL_GPFIFO_A; |
108 | c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_B; | 109 | c->inline_to_memory_class = KEPLER_INLINE_TO_MEMORY_B; |
109 | c->dma_copy_class = MAXWELL_DMA_COPY_A; | 110 | c->dma_copy_class = MAXWELL_DMA_COPY_A; |
110 | 111 | ||