diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-28 20:56:44 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-13 03:09:07 -0400 |
commit | ecf67ebbf69a9ab6481b1517b8920f7ac5828bb5 (patch) | |
tree | 87f9577885854817d46b0e7103933012040eb359 /drivers/gpu/nvgpu/gk20a | |
parent | 90d388ebf8d2f9f9d08f6a5c0f638aa8339c1f24 (diff) |
gpu: nvgpu: Reorg falcon HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
falcon 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: Ib1aaaa248b079bb591ccfada3382b689452de0e9
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1514012
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/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/flcn_gk20a.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/flcn_gk20a.h | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c b/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c index 0ef10a56..a21342c5 100644 --- a/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/flcn_gk20a.c | |||
@@ -382,7 +382,7 @@ void gk20a_falcon_ops(struct nvgpu_falcon *flcn) | |||
382 | gk20a_falcon_engine_dependency_ops(flcn); | 382 | gk20a_falcon_engine_dependency_ops(flcn); |
383 | } | 383 | } |
384 | 384 | ||
385 | static void gk20a_falcon_hal_sw_init(struct nvgpu_falcon *flcn) | 385 | void gk20a_falcon_hal_sw_init(struct nvgpu_falcon *flcn) |
386 | { | 386 | { |
387 | struct gk20a *g = flcn->g; | 387 | struct gk20a *g = flcn->g; |
388 | 388 | ||
@@ -420,8 +420,3 @@ static void gk20a_falcon_hal_sw_init(struct nvgpu_falcon *flcn) | |||
420 | nvgpu_log_info(g, "falcon 0x%x not supported on %s", | 420 | nvgpu_log_info(g, "falcon 0x%x not supported on %s", |
421 | flcn->flcn_id, g->name); | 421 | flcn->flcn_id, g->name); |
422 | } | 422 | } |
423 | |||
424 | void gk20a_falcon_init_hal(struct gpu_ops *gops) | ||
425 | { | ||
426 | gops->falcon.falcon_hal_sw_init = gk20a_falcon_hal_sw_init; | ||
427 | } | ||
diff --git a/drivers/gpu/nvgpu/gk20a/flcn_gk20a.h b/drivers/gpu/nvgpu/gk20a/flcn_gk20a.h index 049da562..7b342fdd 100644 --- a/drivers/gpu/nvgpu/gk20a/flcn_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/flcn_gk20a.h | |||
@@ -14,6 +14,6 @@ | |||
14 | #define __FLCN_GK20A_H__ | 14 | #define __FLCN_GK20A_H__ |
15 | 15 | ||
16 | void gk20a_falcon_ops(struct nvgpu_falcon *flcn); | 16 | void gk20a_falcon_ops(struct nvgpu_falcon *flcn); |
17 | void gk20a_falcon_init_hal(struct gpu_ops *gops); | 17 | void gk20a_falcon_hal_sw_init(struct nvgpu_falcon *flcn); |
18 | 18 | ||
19 | #endif /* __FLCN_GK20A_H__ */ | 19 | #endif /* __FLCN_GK20A_H__ */ |