summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-27 18:09:05 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-27 19:34:37 -0400
commit9907b97985c47003a179c4357274b737cc0699ee (patch)
tree2b40019669007c9bbbdcad29b5f57b27f13df84f /drivers/gpu/nvgpu/gm20b/hal_gm20b.c
parent1552e3fb09741309ea2d5cc4433e247bae7265e1 (diff)
gpu: nvgpu: Reorg ce2 HAL initialization
Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the ce2 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: I7dfd5e8dcd4d6f3623d1b795b6b2e15ff356a13a Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1509632 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/hal_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/hal_gm20b.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
index 228e1a97..c89f3746 100644
--- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
@@ -14,6 +14,7 @@
14 */ 14 */
15 15
16#include "gk20a/gk20a.h" 16#include "gk20a/gk20a.h"
17#include "gk20a/ce2_gk20a.h"
17#include "gk20a/dbg_gpu_gk20a.h" 18#include "gk20a/dbg_gpu_gk20a.h"
18#include "gk20a/fifo_gk20a.h" 19#include "gk20a/fifo_gk20a.h"
19#include "gk20a/css_gr_gk20a.h" 20#include "gk20a/css_gr_gk20a.h"
@@ -24,7 +25,6 @@
24#include "gk20a/regops_gk20a.h" 25#include "gk20a/regops_gk20a.h"
25 26
26#include "ltc_gm20b.h" 27#include "ltc_gm20b.h"
27#include "ce2_gm20b.h"
28#include "gr_gm20b.h" 28#include "gr_gm20b.h"
29#include "ltc_gm20b.h" 29#include "ltc_gm20b.h"
30#include "fb_gm20b.h" 30#include "fb_gm20b.h"
@@ -158,6 +158,10 @@ static const struct gpu_ops gm20b_ops = {
158 .sync_debugfs = gm20b_ltc_sync_debugfs, 158 .sync_debugfs = gm20b_ltc_sync_debugfs,
159#endif 159#endif
160 }, 160 },
161 .ce2 = {
162 .isr_stall = gk20a_ce2_isr,
163 .isr_nonstall = gk20a_ce2_nonstall_isr,
164 },
161 .clock_gating = { 165 .clock_gating = {
162 .slcg_bus_load_gating_prod = 166 .slcg_bus_load_gating_prod =
163 gm20b_slcg_bus_load_gating_prod, 167 gm20b_slcg_bus_load_gating_prod,
@@ -332,6 +336,7 @@ int gm20b_init_hal(struct gk20a *g)
332 u32 val; 336 u32 val;
333 337
334 gops->ltc = gm20b_ops.ltc; 338 gops->ltc = gm20b_ops.ltc;
339 gops->ce2 = gm20b_ops.ce2;
335 gops->clock_gating = gm20b_ops.clock_gating; 340 gops->clock_gating = gm20b_ops.clock_gating;
336 gops->fifo = gm20b_ops.fifo; 341 gops->fifo = gm20b_ops.fifo;
337 gops->mc = gm20b_ops.mc; 342 gops->mc = gm20b_ops.mc;
@@ -384,7 +389,6 @@ int gm20b_init_hal(struct gk20a *g)
384 g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; 389 g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT;
385 gm20b_init_gr(g); 390 gm20b_init_gr(g);
386 gm20b_init_fb(gops); 391 gm20b_init_fb(gops);
387 gm20b_init_ce2(gops);
388 gm20b_init_gr_ctx(gops); 392 gm20b_init_gr_ctx(gops);
389 gm20b_init_mm(gops); 393 gm20b_init_mm(gops);
390 gm20b_init_pmu_ops(g); 394 gm20b_init_pmu_ops(g);