diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-28 20:42:59 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-24 02:35:06 -0400 |
commit | d9f906c1e0f06f54e545727817d227a0bac46a0a (patch) | |
tree | dacb20a0041c585c02236c1e3459b5ca44e6dade | |
parent | e932982853d779b62bc328eb3e9e506dad590f64 (diff) |
gpu: nvgpu: gv11b: Reorg priv_ring HAL init
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
priv_ring sub-module of the gpu_ops struct.
Perform HAL function assignments in hal_gxxxx.c through the
population of a chip-specific copy of gpu_ops.
Jira NVGPU-74
Change-Id: Idee9e8a3a5bfa65b350f0e9fb14c4364c4d6f1d2
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1514103
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 51fe6b0a..8dc9900a 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -253,6 +253,9 @@ static const struct gpu_ops gv11b_ops = { | |||
253 | .falcon = { | 253 | .falcon = { |
254 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, | 254 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, |
255 | }, | 255 | }, |
256 | .priv_ring = { | ||
257 | .isr = gp10b_priv_ring_isr, | ||
258 | }, | ||
256 | .chip_init_gpu_characteristics = gv11b_init_gpu_characteristics, | 259 | .chip_init_gpu_characteristics = gv11b_init_gpu_characteristics, |
257 | .get_litter_value = gv11b_get_litter_value, | 260 | .get_litter_value = gv11b_get_litter_value, |
258 | }; | 261 | }; |
@@ -272,6 +275,7 @@ int gv11b_init_hal(struct gk20a *g) | |||
272 | gops->css = gv11b_ops.css; | 275 | gops->css = gv11b_ops.css; |
273 | #endif | 276 | #endif |
274 | gops->falcon = gv11b_ops.falcon; | 277 | gops->falcon = gv11b_ops.falcon; |
278 | gops->priv_ring = gv11b_ops.priv_ring; | ||
275 | 279 | ||
276 | /* Lone functions */ | 280 | /* Lone functions */ |
277 | gops->chip_init_gpu_characteristics = | 281 | gops->chip_init_gpu_characteristics = |
@@ -282,7 +286,6 @@ int gv11b_init_hal(struct gk20a *g) | |||
282 | gops->privsecurity = 0; | 286 | gops->privsecurity = 0; |
283 | gops->securegpccs = 0; | 287 | gops->securegpccs = 0; |
284 | 288 | ||
285 | gp10b_init_priv_ring(gops); | ||
286 | gv11b_init_gr(gops); | 289 | gv11b_init_gr(gops); |
287 | gv11b_init_fecs_trace_ops(gops); | 290 | gv11b_init_fecs_trace_ops(gops); |
288 | gv11b_init_fb(gops); | 291 | gv11b_init_fb(gops); |