diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-28 20:41:55 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-24 02:35:04 -0400 |
commit | 2b582c5141752ff272c5d059b56433155bc3985a (patch) | |
tree | 1874c77484fb0bf0e927378940e1a6f140390182 /drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |
parent | 907fcae63816b68e43e07e3d7abaad87954b8326 (diff) |
gpu: nvgpu: Reorg priv_ring HAL initialization
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: I9ebf27619f771262e5dc398b1200d6c19d6aef16
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1514102
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/hal_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index fab1c238..4479be42 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -266,6 +266,9 @@ static const struct gpu_ops gp10b_ops = { | |||
266 | .falcon = { | 266 | .falcon = { |
267 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, | 267 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, |
268 | }, | 268 | }, |
269 | .priv_ring = { | ||
270 | .isr = gp10b_priv_ring_isr, | ||
271 | }, | ||
269 | .chip_init_gpu_characteristics = gp10b_init_gpu_characteristics, | 272 | .chip_init_gpu_characteristics = gp10b_init_gpu_characteristics, |
270 | .get_litter_value = gp10b_get_litter_value, | 273 | .get_litter_value = gp10b_get_litter_value, |
271 | }; | 274 | }; |
@@ -288,6 +291,8 @@ int gp10b_init_hal(struct gk20a *g) | |||
288 | #endif | 291 | #endif |
289 | gops->falcon = gp10b_ops.falcon; | 292 | gops->falcon = gp10b_ops.falcon; |
290 | 293 | ||
294 | gops->priv_ring = gp10b_ops.priv_ring; | ||
295 | |||
291 | /* Lone Functions */ | 296 | /* Lone Functions */ |
292 | gops->chip_init_gpu_characteristics = | 297 | gops->chip_init_gpu_characteristics = |
293 | gp10b_ops.chip_init_gpu_characteristics; | 298 | gp10b_ops.chip_init_gpu_characteristics; |
@@ -332,7 +337,6 @@ int gp10b_init_hal(struct gk20a *g) | |||
332 | #endif | 337 | #endif |
333 | 338 | ||
334 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; | 339 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; |
335 | gp10b_init_priv_ring(gops); | ||
336 | gp10b_init_gr(gops); | 340 | gp10b_init_gr(gops); |
337 | gp10b_init_fecs_trace_ops(gops); | 341 | gp10b_init_fecs_trace_ops(gops); |
338 | gp10b_init_fb(gops); | 342 | gp10b_init_fb(gops); |