From dd739fcb039d51606e9a5454ec0aab17bcb01965 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 18 Apr 2018 19:39:46 -0700 Subject: gpu: nvgpu: Remove gk20a_dbg* functions Switch all logging to nvgpu_log*(). gk20a_dbg* macros are intentionally left there because of use from other repositories. Because the new functions do not work without a pointer to struct gk20a, and piping it just for logging is excessive, some log messages are deleted. Change-Id: I00e22e75fe4596a330bb0282ab4774b3639ee31e Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1704148 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index 05b8fc61..62763da3 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c @@ -107,7 +107,9 @@ static bool gk20a_is_channel_active(struct gk20a *g, struct channel_gk20a *ch) int gk20a_tsg_bind_channel(struct tsg_gk20a *tsg, struct channel_gk20a *ch) { - gk20a_dbg_fn(""); + struct gk20a *g = ch->g; + + nvgpu_log_fn(g, " "); /* check if channel is already bound to some TSG */ if (gk20a_is_channel_marked_as_tsg(ch)) { @@ -137,10 +139,10 @@ int gk20a_tsg_bind_channel(struct tsg_gk20a *tsg, nvgpu_ref_get(&tsg->refcount); - gk20a_dbg(gpu_dbg_fn, "BIND tsg:%d channel:%d\n", + nvgpu_log(g, gpu_dbg_fn, "BIND tsg:%d channel:%d\n", tsg->tsgid, ch->chid); - gk20a_dbg_fn("done"); + nvgpu_log_fn(g, "done"); return 0; } @@ -167,7 +169,7 @@ int gk20a_tsg_unbind_channel(struct channel_gk20a *ch) nvgpu_ref_put(&tsg->refcount, gk20a_tsg_release); ch->tsgid = NVGPU_INVALID_TSG_ID; - gk20a_dbg(gpu_dbg_fn, "UNBIND tsg:%d channel:%d\n", + nvgpu_log(g, gpu_dbg_fn, "UNBIND tsg:%d channel:%d\n", tsg->tsgid, ch->chid); return 0; @@ -204,7 +206,7 @@ int gk20a_tsg_set_runlist_interleave(struct tsg_gk20a *tsg, u32 level) struct gk20a *g = tsg->g; int ret; - gk20a_dbg(gpu_dbg_sched, "tsgid=%u interleave=%u", tsg->tsgid, level); + nvgpu_log(g, gpu_dbg_sched, "tsgid=%u interleave=%u", tsg->tsgid, level); switch (level) { case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW: @@ -227,7 +229,7 @@ int gk20a_tsg_set_timeslice(struct tsg_gk20a *tsg, u32 timeslice) { struct gk20a *g = tsg->g; - gk20a_dbg(gpu_dbg_sched, "tsgid=%u timeslice=%u us", tsg->tsgid, timeslice); + nvgpu_log(g, gpu_dbg_sched, "tsgid=%u timeslice=%u us", tsg->tsgid, timeslice); return g->ops.fifo.tsg_set_timeslice(tsg, timeslice); } @@ -300,7 +302,7 @@ struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g, pid_t pid) } } - gk20a_dbg(gpu_dbg_fn, "tsg opened %d\n", tsg->tsgid); + nvgpu_log(g, gpu_dbg_fn, "tsg opened %d\n", tsg->tsgid); return tsg; @@ -343,7 +345,7 @@ void gk20a_tsg_release(struct nvgpu_ref *ref) tsg->runlist_id = ~0; - gk20a_dbg(gpu_dbg_fn, "tsg released %d\n", tsg->tsgid); + nvgpu_log(g, gpu_dbg_fn, "tsg released %d\n", tsg->tsgid); } struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch) -- cgit v1.2.2