diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-10-27 05:06:59 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:54 -0400 |
commit | 2d5ff668cbc6a932df2c9cf79627d1d340e5c2c0 (patch) | |
tree | 1d9bc4b774a9c2cea339891eaef3af5b87ee354d /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | 23a182aaa61d120c965f1bce09609cc14d4e14eb (diff) |
gpu: nvgpu: GR and LTC HAL to use const structs
Convert GR and LTC HALs to use const structs, and initialize them
with macros.
Bug 1567274
Change-Id: Ia3f24a5eccb27578d9cba69755f636818d11275c
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/590371
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 9f2e0017..777d7ca9 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include "debug_gk20a.h" | 29 | #include "debug_gk20a.h" |
30 | 30 | ||
31 | #include "gr_ops.h" | ||
31 | #include "gk20a.h" | 32 | #include "gk20a.h" |
32 | #include "dbg_gpu_gk20a.h" | 33 | #include "dbg_gpu_gk20a.h" |
33 | #include "fence_gk20a.h" | 34 | #include "fence_gk20a.h" |
@@ -638,7 +639,7 @@ void gk20a_free_channel(struct channel_gk20a *ch, bool finish) | |||
638 | gk20a_free_error_notifiers(ch); | 639 | gk20a_free_error_notifiers(ch); |
639 | 640 | ||
640 | /* release channel ctx */ | 641 | /* release channel ctx */ |
641 | g->ops.gr.free_channel_ctx(ch); | 642 | g->ops.gr->free_channel_ctx(ch); |
642 | 643 | ||
643 | gk20a_gr_flush_channel_tlb(gr); | 644 | gk20a_gr_flush_channel_tlb(gr); |
644 | 645 | ||
@@ -1558,8 +1559,8 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
1558 | 1559 | ||
1559 | #ifdef CONFIG_DEBUG_FS | 1560 | #ifdef CONFIG_DEBUG_FS |
1560 | /* update debug settings */ | 1561 | /* update debug settings */ |
1561 | if (g->ops.ltc.sync_debugfs) | 1562 | if (g->ops.ltc->sync_debugfs) |
1562 | g->ops.ltc.sync_debugfs(g); | 1563 | g->ops.ltc->sync_debugfs(g); |
1563 | #endif | 1564 | #endif |
1564 | 1565 | ||
1565 | gk20a_dbg_info("channel %d", c->hw_chid); | 1566 | gk20a_dbg_info("channel %d", c->hw_chid); |
@@ -2080,7 +2081,7 @@ static int gk20a_channel_zcull_bind(struct channel_gk20a *ch, | |||
2080 | 2081 | ||
2081 | gk20a_dbg_fn(""); | 2082 | gk20a_dbg_fn(""); |
2082 | 2083 | ||
2083 | return g->ops.gr.bind_ctxsw_zcull(g, gr, ch, | 2084 | return g->ops.gr->bind_ctxsw_zcull(g, gr, ch, |
2084 | args->gpu_va, args->mode); | 2085 | args->gpu_va, args->mode); |
2085 | } | 2086 | } |
2086 | 2087 | ||
@@ -2300,7 +2301,7 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2300 | __func__, cmd); | 2301 | __func__, cmd); |
2301 | return err; | 2302 | return err; |
2302 | } | 2303 | } |
2303 | err = ch->g->ops.gr.alloc_obj_ctx(ch, | 2304 | err = ch->g->ops.gr->alloc_obj_ctx(ch, |
2304 | (struct nvgpu_alloc_obj_ctx_args *)buf); | 2305 | (struct nvgpu_alloc_obj_ctx_args *)buf); |
2305 | gk20a_idle(dev); | 2306 | gk20a_idle(dev); |
2306 | break; | 2307 | break; |
@@ -2312,7 +2313,7 @@ long gk20a_channel_ioctl(struct file *filp, | |||
2312 | __func__, cmd); | 2313 | __func__, cmd); |
2313 | return err; | 2314 | return err; |
2314 | } | 2315 | } |
2315 | err = ch->g->ops.gr.free_obj_ctx(ch, | 2316 | err = ch->g->ops.gr->free_obj_ctx(ch, |
2316 | (struct nvgpu_free_obj_ctx_args *)buf); | 2317 | (struct nvgpu_free_obj_ctx_args *)buf); |
2317 | gk20a_idle(dev); | 2318 | gk20a_idle(dev); |
2318 | break; | 2319 | break; |