summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-28 20:41:55 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-24 02:35:04 -0400
commit2b582c5141752ff272c5d059b56433155bc3985a (patch)
tree1874c77484fb0bf0e927378940e1a6f140390182 /drivers/gpu/nvgpu/gm20b
parent907fcae63816b68e43e07e3d7abaad87954b8326 (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/gm20b')
-rw-r--r--drivers/gpu/nvgpu/gm20b/hal_gm20b.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
index fa7cf368..87acb25c 100644
--- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
@@ -256,6 +256,9 @@ static const struct gpu_ops gm20b_ops = {
256 .falcon = { 256 .falcon = {
257 .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, 257 .falcon_hal_sw_init = gk20a_falcon_hal_sw_init,
258 }, 258 },
259 .priv_ring = {
260 .isr = gk20a_priv_ring_isr,
261 },
259 .chip_init_gpu_characteristics = gk20a_init_gpu_characteristics, 262 .chip_init_gpu_characteristics = gk20a_init_gpu_characteristics,
260 .get_litter_value = gm20b_get_litter_value, 263 .get_litter_value = gm20b_get_litter_value,
261}; 264};
@@ -278,6 +281,8 @@ int gm20b_init_hal(struct gk20a *g)
278#endif 281#endif
279 gops->falcon = gm20b_ops.falcon; 282 gops->falcon = gm20b_ops.falcon;
280 283
284 gops->priv_ring = gm20b_ops.priv_ring;
285
281 /* Lone functions */ 286 /* Lone functions */
282 gops->chip_init_gpu_characteristics = 287 gops->chip_init_gpu_characteristics =
283 gm20b_ops.chip_init_gpu_characteristics; 288 gm20b_ops.chip_init_gpu_characteristics;
@@ -312,9 +317,7 @@ int gm20b_init_hal(struct gk20a *g)
312 } 317 }
313 } 318 }
314#endif 319#endif
315
316 g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; 320 g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT;
317 gk20a_init_priv_ring(gops);
318 gm20b_init_gr(gops); 321 gm20b_init_gr(gops);
319 gm20b_init_fb(gops); 322 gm20b_init_fb(gops);
320 gm20b_init_fifo(gops); 323 gm20b_init_fifo(gops);