diff options
author | Lakshmanan M <lm@nvidia.com> | 2016-06-02 00:14:13 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-07 15:31:40 -0400 |
commit | 6f24a7666045b25072282d4c29ff190b7af33e59 (patch) | |
tree | 06a3ce89484f63a7a95443e3f037d5e4a3e6ece0 /drivers/gpu | |
parent | 822b0dc53823e9c5bc3cbcdc78a62cc2c7f0647c (diff) |
gpu: nvgpu: Add multiple engine and runlist support
This CL covers the following modification,
1) Added multiple engine_info support
2) Added multiple runlist_info support
3) Initial changes for ASYNC CE support
4) Added ASYNC CE interrupt support for
Volta GPU series
5) Removed hard coded engine_id logic and
made generic way
6) Code cleanup for readability
JIRA DNVGPU-26
Change-Id: Ief3b586ff3d9f492f0277243b2a94952bab48786
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: http://git-master/r/1156023
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/Makefile | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/ce_gv11b.c (renamed from drivers/gpu/nvgpu/gv11b/ce2_gv11b.c) | 15 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/ce_gv11b.h (renamed from drivers/gpu/nvgpu/gv11b/ce2_gv11b.h) | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hw_ce_gv11b.h (renamed from drivers/gpu/nvgpu/gv11b/hw_ce2_gv11b.h) | 18 |
6 files changed, 28 insertions, 27 deletions
diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index 4761ba6e..4ea56d8e 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile | |||
@@ -10,7 +10,7 @@ nvgpu-y += \ | |||
10 | $(nvgpu-t19x)/gv11b/fb_gv11b.o \ | 10 | $(nvgpu-t19x)/gv11b/fb_gv11b.o \ |
11 | $(nvgpu-t19x)/gv11b/fifo_gv11b.o \ | 11 | $(nvgpu-t19x)/gv11b/fifo_gv11b.o \ |
12 | $(nvgpu-t19x)/gv11b/mm_gv11b.o \ | 12 | $(nvgpu-t19x)/gv11b/mm_gv11b.o \ |
13 | $(nvgpu-t19x)/gv11b/ce2_gv11b.o \ | 13 | $(nvgpu-t19x)/gv11b/ce_gv11b.o \ |
14 | $(nvgpu-t19x)/gv11b/gr_ctx_gv11b.o \ | 14 | $(nvgpu-t19x)/gv11b/gr_ctx_gv11b.o \ |
15 | $(nvgpu-t19x)/gv11b/pmu_gv11b.o \ | 15 | $(nvgpu-t19x)/gv11b/pmu_gv11b.o \ |
16 | $(nvgpu-t19x)/gv11b/therm_gv11b.o | 16 | $(nvgpu-t19x)/gv11b/therm_gv11b.o |
diff --git a/drivers/gpu/nvgpu/gv11b/ce2_gv11b.c b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c index d4ba4003..961054e0 100644 --- a/drivers/gpu/nvgpu/gv11b/ce2_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * GV11B Graphics Copy Engine (gr host) | 2 | * Volta GPU series Copy Engine. |
3 | * | 3 | * |
4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
@@ -13,16 +13,15 @@ | |||
13 | * more details. | 13 | * more details. |
14 | * | 14 | * |
15 | * You should have received a copy of the GNU General Public License along with | 15 | * You should have received a copy of the GNU General Public License along with |
16 | * this program; if not, write to the Free Software Foundation, Inc., | 16 | * this program. |
17 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | */ | 17 | */ |
19 | 18 | ||
20 | #include "gk20a/gk20a.h" /* FERMI and MAXWELL classes defined here */ | 19 | #include "gk20a/gk20a.h" /* FERMI and MAXWELL classes defined here */ |
21 | #include "hw_ce2_gv11b.h" | 20 | #include "hw_ce_gv11b.h" |
22 | #include "gp10b/ce2_gp10b.h" | 21 | #include "gp10b/ce_gp10b.h" |
23 | #include "ce2_gv11b.h" | 22 | #include "ce_gv11b.h" |
24 | 23 | ||
25 | void gv11b_init_ce2(struct gpu_ops *gops) | 24 | void gv11b_init_ce(struct gpu_ops *gops) |
26 | { | 25 | { |
27 | gp10b_init_ce2(gops); | 26 | gp10b_init_ce(gops); |
28 | } | 27 | } |
diff --git a/drivers/gpu/nvgpu/gv11b/ce2_gv11b.h b/drivers/gpu/nvgpu/gv11b/ce_gv11b.h index a7b2f99a..27dffa5d 100644 --- a/drivers/gpu/nvgpu/gv11b/ce2_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/ce_gv11b.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * GV11B graphics copy engine | 3 | * Volta GPU series copy engine |
4 | * | 4 | * |
5 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 5 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. |
6 | * | 6 | * |
@@ -14,14 +14,13 @@ | |||
14 | * more details. | 14 | * more details. |
15 | * | 15 | * |
16 | * You should have received a copy of the GNU General Public License along with | 16 | * You should have received a copy of the GNU General Public License along with |
17 | * this program; if not, write to the Free Software Foundation, Inc., | 17 | * this program. |
18 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | 18 | */ |
20 | #ifndef __CE2_GV11B_H__ | 19 | #ifndef __CE_GV11B_H__ |
21 | #define __CE2_GV11B_H__ | 20 | #define __CE_GV11B_H__ |
22 | 21 | ||
23 | struct gpu_ops; | 22 | struct gpu_ops; |
24 | 23 | ||
25 | void gv11b_init_ce2(struct gpu_ops *gops); | 24 | void gv11b_init_ce(struct gpu_ops *gops); |
26 | 25 | ||
27 | #endif /*__CE2_GV11B_H__*/ | 26 | #endif /*__CE2_GV11B_H__*/ |
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index ad8e4eff..a4301fa9 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -1062,6 +1062,9 @@ static int gr_gv11b_dump_gr_status_regs(struct gk20a *g, | |||
1062 | struct gk20a_debug_output *o) | 1062 | struct gk20a_debug_output *o) |
1063 | { | 1063 | { |
1064 | struct gr_gk20a *gr = &g->gr; | 1064 | struct gr_gk20a *gr = &g->gr; |
1065 | u32 gr_engine_id; | ||
1066 | |||
1067 | gr_engine_id = gk20a_fifo_get_gr_engine_id(g); | ||
1065 | 1068 | ||
1066 | gk20a_debug_output(o, "NV_PGRAPH_STATUS: 0x%x\n", | 1069 | gk20a_debug_output(o, "NV_PGRAPH_STATUS: 0x%x\n", |
1067 | gk20a_readl(g, gr_status_r())); | 1070 | gk20a_readl(g, gr_status_r())); |
@@ -1082,7 +1085,7 @@ static int gr_gv11b_dump_gr_status_regs(struct gk20a *g, | |||
1082 | gk20a_debug_output(o, "NV_PGRAPH_FECS_INTR : 0x%x\n", | 1085 | gk20a_debug_output(o, "NV_PGRAPH_FECS_INTR : 0x%x\n", |
1083 | gk20a_readl(g, gr_fecs_intr_r())); | 1086 | gk20a_readl(g, gr_fecs_intr_r())); |
1084 | gk20a_debug_output(o, "NV_PFIFO_ENGINE_STATUS(GR) : 0x%x\n", | 1087 | gk20a_debug_output(o, "NV_PFIFO_ENGINE_STATUS(GR) : 0x%x\n", |
1085 | gk20a_readl(g, fifo_engine_status_r(ENGINE_GR_GK20A))); | 1088 | gk20a_readl(g, fifo_engine_status_r(gr_engine_id))); |
1086 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY0: 0x%x\n", | 1089 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY0: 0x%x\n", |
1087 | gk20a_readl(g, gr_activity_0_r())); | 1090 | gk20a_readl(g, gr_activity_0_r())); |
1088 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY1: 0x%x\n", | 1091 | gk20a_debug_output(o, "NV_PGRAPH_ACTIVITY1: 0x%x\n", |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index e340c97e..876b5748 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "gv11b/ltc_gv11b.h" | 26 | #include "gv11b/ltc_gv11b.h" |
27 | #include "gv11b/fecs_trace_gv11b.h" | 27 | #include "gv11b/fecs_trace_gv11b.h" |
28 | #include "gv11b/gv11b.h" | 28 | #include "gv11b/gv11b.h" |
29 | #include "gv11b/ce2_gv11b.h" | 29 | #include "gv11b/ce_gv11b.h" |
30 | #include "gv11b/gr_ctx_gv11b.h" | 30 | #include "gv11b/gr_ctx_gv11b.h" |
31 | #include "gv11b/mm_gv11b.h" | 31 | #include "gv11b/mm_gv11b.h" |
32 | #include "gv11b/pmu_gv11b.h" | 32 | #include "gv11b/pmu_gv11b.h" |
@@ -47,7 +47,7 @@ int gv11b_init_hal(struct gk20a *g) | |||
47 | gv11b_init_ltc(gops); | 47 | gv11b_init_ltc(gops); |
48 | gv11b_init_gr(gops); | 48 | gv11b_init_gr(gops); |
49 | gv11b_init_fecs_trace_ops(gops); | 49 | gv11b_init_fecs_trace_ops(gops); |
50 | gv11b_init_ce2(gops); | 50 | gv11b_init_ce(gops); |
51 | gv11b_init_mm(gops); | 51 | gv11b_init_mm(gops); |
52 | gv11b_init_gr_ctx(gops); | 52 | gv11b_init_gr_ctx(gops); |
53 | gv11b_init_pmu_ops(gops); | 53 | gv11b_init_pmu_ops(gops); |
diff --git a/drivers/gpu/nvgpu/gv11b/hw_ce2_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_ce_gv11b.h index e58bf271..9f279207 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_ce2_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_ce_gv11b.h | |||
@@ -47,34 +47,34 @@ | |||
47 | * comparison with unshifted values appropriate for use in field <y> | 47 | * comparison with unshifted values appropriate for use in field <y> |
48 | * of register <x>. | 48 | * of register <x>. |
49 | */ | 49 | */ |
50 | #ifndef _hw_ce2_gv11b_h_ | 50 | #ifndef _hw_ce_gv11b_h_ |
51 | #define _hw_ce2_gv11b_h_ | 51 | #define _hw_ce_gv11b_h_ |
52 | 52 | ||
53 | static inline u32 ce2_intr_status_r(u32 i) | 53 | static inline u32 ce_intr_status_r(u32 i) |
54 | { | 54 | { |
55 | return 0x00104410 + i*128; | 55 | return 0x00104410 + i*128; |
56 | } | 56 | } |
57 | static inline u32 ce2_intr_status_blockpipe_pending_f(void) | 57 | static inline u32 ce_intr_status_blockpipe_pending_f(void) |
58 | { | 58 | { |
59 | return 0x1; | 59 | return 0x1; |
60 | } | 60 | } |
61 | static inline u32 ce2_intr_status_blockpipe_reset_f(void) | 61 | static inline u32 ce_intr_status_blockpipe_reset_f(void) |
62 | { | 62 | { |
63 | return 0x1; | 63 | return 0x1; |
64 | } | 64 | } |
65 | static inline u32 ce2_intr_status_nonblockpipe_pending_f(void) | 65 | static inline u32 ce_intr_status_nonblockpipe_pending_f(void) |
66 | { | 66 | { |
67 | return 0x2; | 67 | return 0x2; |
68 | } | 68 | } |
69 | static inline u32 ce2_intr_status_nonblockpipe_reset_f(void) | 69 | static inline u32 ce_intr_status_nonblockpipe_reset_f(void) |
70 | { | 70 | { |
71 | return 0x2; | 71 | return 0x2; |
72 | } | 72 | } |
73 | static inline u32 ce2_intr_status_launcherr_pending_f(void) | 73 | static inline u32 ce_intr_status_launcherr_pending_f(void) |
74 | { | 74 | { |
75 | return 0x4; | 75 | return 0x4; |
76 | } | 76 | } |
77 | static inline u32 ce2_intr_status_launcherr_reset_f(void) | 77 | static inline u32 ce_intr_status_launcherr_reset_f(void) |
78 | { | 78 | { |
79 | return 0x4; | 79 | return 0x4; |
80 | } | 80 | } |