diff options
author | Lakshmanan M <lm@nvidia.com> | 2016-06-02 00:09:52 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:17 -0500 |
commit | 9454529abe0ac42d15df01e36898cd2c840de9c8 (patch) | |
tree | 6d965a08f74b72aa948edcb224a4f753d86f3b90 /drivers/gpu/nvgpu/gp106 | |
parent | c8569f1ebfcdd4546d3674458684c7e1315872a4 (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
Pascal GPU series
5) Removed hard coded engine_id logic and
made generic way
6) Code cleanup for readability
JIRA DNVGPU-26
Change-Id: Ibf46a89a5308c82f01040ffa979c5014b3206f8e
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: http://git-master/r/1156022
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hw_ce_gp106.h (renamed from drivers/gpu/nvgpu/gp106/hw_ce2_gp106.h) | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hw_proj_gp106.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hw_top_gp106.h | 8 |
4 files changed, 26 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 5c9e012d..1dd16139 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "gp10b/mc_gp10b.h" | 24 | #include "gp10b/mc_gp10b.h" |
25 | #include "gp10b/ltc_gp10b.h" | 25 | #include "gp10b/ltc_gp10b.h" |
26 | #include "gp10b/mm_gp10b.h" | 26 | #include "gp10b/mm_gp10b.h" |
27 | #include "gp10b/ce2_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 "gp10b/fifo_gp10b.h" |
30 | #include "gp10b/gp10b_gating_reglist.h" | 30 | #include "gp10b/gp10b_gating_reglist.h" |
@@ -149,6 +149,9 @@ static int gp106_get_litter_value(struct gk20a *g, | |||
149 | case GPU_LIT_ROP_SHARED_BASE: | 149 | case GPU_LIT_ROP_SHARED_BASE: |
150 | ret = proj_rop_shared_base_v(); | 150 | ret = proj_rop_shared_base_v(); |
151 | break; | 151 | break; |
152 | case GPU_LIT_HOST_NUM_ENGINES: | ||
153 | ret = proj_host_num_engines_v(); | ||
154 | break; | ||
152 | case GPU_LIT_HOST_NUM_PBDMA: | 155 | case GPU_LIT_HOST_NUM_PBDMA: |
153 | ret = proj_host_num_pbdma_v(); | 156 | ret = proj_host_num_pbdma_v(); |
154 | break; | 157 | break; |
@@ -189,7 +192,7 @@ int gp106_init_hal(struct gk20a *g) | |||
189 | gp10b_init_ltc(gops); | 192 | gp10b_init_ltc(gops); |
190 | gp10b_init_fb(gops); | 193 | gp10b_init_fb(gops); |
191 | gp10b_init_fifo(gops); | 194 | gp10b_init_fifo(gops); |
192 | gp10b_init_ce2(gops); | 195 | gp10b_init_ce(gops); |
193 | gp106_init_gr_ctx(gops); | 196 | gp106_init_gr_ctx(gops); |
194 | gp10b_init_mm(gops); | 197 | gp10b_init_mm(gops); |
195 | gp106_init_pmu_ops(gops); | 198 | gp106_init_pmu_ops(gops); |
diff --git a/drivers/gpu/nvgpu/gp106/hw_ce2_gp106.h b/drivers/gpu/nvgpu/gp106/hw_ce_gp106.h index d56b930b..36311136 100644 --- a/drivers/gpu/nvgpu/gp106/hw_ce2_gp106.h +++ b/drivers/gpu/nvgpu/gp106/hw_ce_gp106.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_gp106_h_ | 50 | #ifndef _hw_ce_gp106_h_ |
51 | #define _hw_ce2_gp106_h_ | 51 | #define _hw_ce_gp106_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 | } |
diff --git a/drivers/gpu/nvgpu/gp106/hw_proj_gp106.h b/drivers/gpu/nvgpu/gp106/hw_proj_gp106.h index 0b4b86b1..01e835ec 100644 --- a/drivers/gpu/nvgpu/gp106/hw_proj_gp106.h +++ b/drivers/gpu/nvgpu/gp106/hw_proj_gp106.h | |||
@@ -106,6 +106,10 @@ static inline u32 proj_tpc_in_gpc_shared_base_v(void) | |||
106 | { | 106 | { |
107 | return 0x00001800; | 107 | return 0x00001800; |
108 | } | 108 | } |
109 | static inline u32 proj_host_num_engines_v(void) | ||
110 | { | ||
111 | return 0x00000009; | ||
112 | } | ||
109 | static inline u32 proj_host_num_pbdma_v(void) | 113 | static inline u32 proj_host_num_pbdma_v(void) |
110 | { | 114 | { |
111 | return 0x00000004; | 115 | return 0x00000004; |
diff --git a/drivers/gpu/nvgpu/gp106/hw_top_gp106.h b/drivers/gpu/nvgpu/gp106/hw_top_gp106.h index bef6b804..e833c152 100644 --- a/drivers/gpu/nvgpu/gp106/hw_top_gp106.h +++ b/drivers/gpu/nvgpu/gp106/hw_top_gp106.h | |||
@@ -146,6 +146,14 @@ static inline u32 top_device_info_type_enum_copy0_f(void) | |||
146 | { | 146 | { |
147 | return 0x4; | 147 | return 0x4; |
148 | } | 148 | } |
149 | static inline u32 top_device_info_type_enum_lce_v(void) | ||
150 | { | ||
151 | return 0x00000013; | ||
152 | } | ||
153 | static inline u32 top_device_info_type_enum_lce_f(void) | ||
154 | { | ||
155 | return 0x4c; | ||
156 | } | ||
149 | static inline u32 top_device_info_entry_v(u32 r) | 157 | static inline u32 top_device_info_entry_v(u32 r) |
150 | { | 158 | { |
151 | return (r >> 0) & 0x3; | 159 | return (r >> 0) & 0x3; |