summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/module.c
diff options
context:
space:
mode:
authorddutta <ddutta@nvidia.com>2018-09-17 03:39:18 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-21 06:15:35 -0400
commitc616fba1eb357684e3796603a226f4df7d88be73 (patch)
tree8ace774fed31400ac8073cf67378689d6068d4a5 /drivers/gpu/nvgpu/os/linux/module.c
parentc5810a670d367ae1dc405fcc3108e11265df34bb (diff)
gpu: nvgpu: remove circular dependency between hal.c and gk20a/
gk20a/hal.c depends on HAL init functions in all chips. But all chips also depend on gk20a. That creates a circular dependency. In order to solve the above, move gpu_init_hal and gk20a_detect_chip to common/init/hal_init.c. These methods are declared in include/nvgpu/hal_init.h. Also, the above methods are renamed to nvgpu_init_hal and nvgpu_detect_chip respectively. Jira NVGPU-613 Change-Id: Ib0df90287d4491571e4751475739b75fabd1041b Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1827576 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/module.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c
index 9d84cc2f..dbc97f95 100644
--- a/drivers/gpu/nvgpu/os/linux/module.c
+++ b/drivers/gpu/nvgpu/os/linux/module.c
@@ -33,6 +33,7 @@
33 33
34#include <soc/tegra/fuse.h> 34#include <soc/tegra/fuse.h>
35 35
36#include <nvgpu/hal_init.h>
36#include <nvgpu/dma.h> 37#include <nvgpu/dma.h>
37#include <nvgpu/kmem.h> 38#include <nvgpu/kmem.h>
38#include <nvgpu/nvgpu_common.h> 39#include <nvgpu/nvgpu_common.h>
@@ -266,7 +267,7 @@ int gk20a_pm_finalize_poweron(struct device *dev)
266 INIT_WORK(&l->nonstall_fn_work, nvgpu_intr_nonstall_cb); 267 INIT_WORK(&l->nonstall_fn_work, nvgpu_intr_nonstall_cb);
267 } 268 }
268 269
269 err = gk20a_detect_chip(g); 270 err = nvgpu_detect_chip(g);
270 if (err) 271 if (err)
271 goto done; 272 goto done;
272 273