From 2b582c5141752ff272c5d059b56433155bc3985a Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 28 Jun 2017 17:41:55 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1514102 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b') 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 = { .falcon = { .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, }, + .priv_ring = { + .isr = gk20a_priv_ring_isr, + }, .chip_init_gpu_characteristics = gk20a_init_gpu_characteristics, .get_litter_value = gm20b_get_litter_value, }; @@ -278,6 +281,8 @@ int gm20b_init_hal(struct gk20a *g) #endif gops->falcon = gm20b_ops.falcon; + gops->priv_ring = gm20b_ops.priv_ring; + /* Lone functions */ gops->chip_init_gpu_characteristics = gm20b_ops.chip_init_gpu_characteristics; @@ -312,9 +317,7 @@ int gm20b_init_hal(struct gk20a *g) } } #endif - g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; - gk20a_init_priv_ring(gops); gm20b_init_gr(gops); gm20b_init_fb(gops); gm20b_init_fifo(gops); -- cgit v1.2.2