From 2d5ff668cbc6a932df2c9cf79627d1d340e5c2c0 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 27 Oct 2014 11:06:59 +0200 Subject: 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 Reviewed-on: http://git-master/r/590371 --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') 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 @@ #include "debug_gk20a.h" +#include "gr_ops.h" #include "gk20a.h" #include "dbg_gpu_gk20a.h" #include "fence_gk20a.h" @@ -638,7 +639,7 @@ void gk20a_free_channel(struct channel_gk20a *ch, bool finish) gk20a_free_error_notifiers(ch); /* release channel ctx */ - g->ops.gr.free_channel_ctx(ch); + g->ops.gr->free_channel_ctx(ch); gk20a_gr_flush_channel_tlb(gr); @@ -1558,8 +1559,8 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, #ifdef CONFIG_DEBUG_FS /* update debug settings */ - if (g->ops.ltc.sync_debugfs) - g->ops.ltc.sync_debugfs(g); + if (g->ops.ltc->sync_debugfs) + g->ops.ltc->sync_debugfs(g); #endif gk20a_dbg_info("channel %d", c->hw_chid); @@ -2080,7 +2081,7 @@ static int gk20a_channel_zcull_bind(struct channel_gk20a *ch, gk20a_dbg_fn(""); - return g->ops.gr.bind_ctxsw_zcull(g, gr, ch, + return g->ops.gr->bind_ctxsw_zcull(g, gr, ch, args->gpu_va, args->mode); } @@ -2300,7 +2301,7 @@ long gk20a_channel_ioctl(struct file *filp, __func__, cmd); return err; } - err = ch->g->ops.gr.alloc_obj_ctx(ch, + err = ch->g->ops.gr->alloc_obj_ctx(ch, (struct nvgpu_alloc_obj_ctx_args *)buf); gk20a_idle(dev); break; @@ -2312,7 +2313,7 @@ long gk20a_channel_ioctl(struct file *filp, __func__, cmd); return err; } - err = ch->g->ops.gr.free_obj_ctx(ch, + err = ch->g->ops.gr->free_obj_ctx(ch, (struct nvgpu_free_obj_ctx_args *)buf); gk20a_idle(dev); break; -- cgit v1.2.2