diff options
-rw-r--r-- | drivers/gpu/nvgpu/Makefile | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/fifo_gp106.c | 30 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/fifo_gp106.h | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 4 |
4 files changed, 52 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index 1579e6eb..643c0967 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile | |||
@@ -25,7 +25,8 @@ nvgpu-y += \ | |||
25 | $(nvgpu-t18x)/gp106/gr_gp106.o \ | 25 | $(nvgpu-t18x)/gp106/gr_gp106.o \ |
26 | $(nvgpu-t18x)/gp106/gr_ctx_gp106.o \ | 26 | $(nvgpu-t18x)/gp106/gr_ctx_gp106.o \ |
27 | $(nvgpu-t18x)/gp106/acr_gp106.o \ | 27 | $(nvgpu-t18x)/gp106/acr_gp106.o \ |
28 | $(nvgpu-t18x)/gp106/sec2_gp106.o | 28 | $(nvgpu-t18x)/gp106/sec2_gp106.o \ |
29 | $(nvgpu-t18x)/gp106/fifo_gp106.o | ||
29 | 30 | ||
30 | nvgpu-$(CONFIG_TEGRA_GK20A) += $(nvgpu-t18x)/gp10b/platform_gp10b_tegra.o | 31 | nvgpu-$(CONFIG_TEGRA_GK20A) += $(nvgpu-t18x)/gp10b/platform_gp10b_tegra.o |
31 | 32 | ||
diff --git a/drivers/gpu/nvgpu/gp106/fifo_gp106.c b/drivers/gpu/nvgpu/gp106/fifo_gp106.c new file mode 100644 index 00000000..3c70d517 --- /dev/null +++ b/drivers/gpu/nvgpu/gp106/fifo_gp106.c | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, 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 | #include "gk20a/gk20a.h" | ||
15 | #include "gp10b/fifo_gp10b.h" | ||
16 | #include "fifo_gp106.h" | ||
17 | #include "hw_ccsr_gp106.h" | ||
18 | #include "hw_fifo_gp106.h" | ||
19 | |||
20 | static u32 gp106_fifo_get_num_fifos(struct gk20a *g) | ||
21 | { | ||
22 | return ccsr_channel__size_1_v(); | ||
23 | } | ||
24 | |||
25 | void gp106_init_fifo(struct gpu_ops *gops) | ||
26 | { | ||
27 | gp10b_init_fifo(gops); | ||
28 | gops->fifo.get_num_fifos = gp106_fifo_get_num_fifos; | ||
29 | gops->fifo.eng_runlist_base_size = fifo_eng_runlist_base__size_1_v; | ||
30 | } | ||
diff --git a/drivers/gpu/nvgpu/gp106/fifo_gp106.h b/drivers/gpu/nvgpu/gp106/fifo_gp106.h new file mode 100644 index 00000000..1bcec9ef --- /dev/null +++ b/drivers/gpu/nvgpu/gp106/fifo_gp106.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, 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 NVGPU_FIFO_GP106_H | ||
15 | #define NVGPU_FIFO_GP106_H | ||
16 | struct gpu_ops; | ||
17 | void gp106_init_fifo(struct gpu_ops *gops); | ||
18 | #endif | ||
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 1b22547d..f9cd2e07 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "gp10b/mm_gp10b.h" | 26 | #include "gp10b/mm_gp10b.h" |
27 | #include "gp10b/ce_gp10b.h" | 27 | #include "gp10b/ce_gp10b.h" |
28 | #include "gp10b/fb_gp10b.h" | 28 | #include "gp10b/fb_gp10b.h" |
29 | #include "gp10b/fifo_gp10b.h" | 29 | #include "gp106/fifo_gp106.h" |
30 | #include "gp10b/gp10b_gating_reglist.h" | 30 | #include "gp10b/gp10b_gating_reglist.h" |
31 | #include "gp10b/regops_gp10b.h" | 31 | #include "gp10b/regops_gp10b.h" |
32 | #include "gp10b/cde_gp10b.h" | 32 | #include "gp10b/cde_gp10b.h" |
@@ -193,7 +193,7 @@ int gp106_init_hal(struct gk20a *g) | |||
193 | gp106_init_gr(gops); | 193 | gp106_init_gr(gops); |
194 | gp10b_init_ltc(gops); | 194 | gp10b_init_ltc(gops); |
195 | gp10b_init_fb(gops); | 195 | gp10b_init_fb(gops); |
196 | gp10b_init_fifo(gops); | 196 | gp106_init_fifo(gops); |
197 | gp10b_init_ce(gops); | 197 | gp10b_init_ce(gops); |
198 | gp106_init_gr_ctx(gops); | 198 | gp106_init_gr_ctx(gops); |
199 | gp106_init_mm(gops); | 199 | gp106_init_mm(gops); |