diff options
author | Sunny He <suhe@nvidia.com> | 2017-07-26 13:45:38 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-27 19:34:44 -0400 |
commit | afa29933e45b2c3054db67065a0a68606bbc1f52 (patch) | |
tree | f3f4d122365ecc82ce6abb98b7ce59c6a92e3b90 /drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c | |
parent | 3c556c5e9573ffa69bfe64ed1401ed4a9141acb3 (diff) |
gpu: nvgpu: gv11b: Reorg gr_ctx HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
gr_ctx 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: Icc6b0f968f2e3209de190d445c878a4b20bfcf4a
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1527418
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c index 6cb42baa..920e4c16 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * | 2 | * |
3 | * GV11B Graphics Context | 3 | * GV11B Graphics Context |
4 | * | 4 | * |
5 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 5 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms and conditions of the GNU General Public License, | 8 | * under the terms and conditions of the GNU General Public License, |
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include "gr_ctx_gv11b.h" | 23 | #include "gr_ctx_gv11b.h" |
24 | 24 | ||
25 | static int gr_gv11b_get_netlist_name(struct gk20a *g, int index, char *name) | 25 | int gr_gv11b_get_netlist_name(struct gk20a *g, int index, char *name) |
26 | { | 26 | { |
27 | switch (index) { | 27 | switch (index) { |
28 | #ifdef GV11B_NETLIST_IMAGE_FW_NAME | 28 | #ifdef GV11B_NETLIST_IMAGE_FW_NAME |
@@ -57,7 +57,7 @@ static int gr_gv11b_get_netlist_name(struct gk20a *g, int index, char *name) | |||
57 | return -1; | 57 | return -1; |
58 | } | 58 | } |
59 | 59 | ||
60 | static bool gr_gv11b_is_firmware_defined(void) | 60 | bool gr_gv11b_is_firmware_defined(void) |
61 | { | 61 | { |
62 | #ifdef GV11B_NETLIST_IMAGE_FW_NAME | 62 | #ifdef GV11B_NETLIST_IMAGE_FW_NAME |
63 | return true; | 63 | return true; |
@@ -65,9 +65,3 @@ static bool gr_gv11b_is_firmware_defined(void) | |||
65 | return false; | 65 | return false; |
66 | #endif | 66 | #endif |
67 | } | 67 | } |
68 | |||
69 | void gv11b_init_gr_ctx(struct gpu_ops *gops) { | ||
70 | gops->gr_ctx.get_netlist_name = gr_gv11b_get_netlist_name; | ||
71 | gops->gr_ctx.is_fw_defined = gr_gv11b_is_firmware_defined; | ||
72 | gops->gr_ctx.use_dma_for_fw_bootstrap = false; | ||
73 | } | ||