summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-04-18 22:39:46 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-09 21:26:04 -0400
commitdd739fcb039d51606e9a5454ec0aab17bcb01965 (patch)
tree806ba8575d146367ad1be00086ca0cdae35a6b28 /drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
parent7e66f2a63d4855e763fa768047dfc32f6f96b771 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1704148 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/tsg_gk20a.c18
1 files changed, 10 insertions, 8 deletions
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)
107int gk20a_tsg_bind_channel(struct tsg_gk20a *tsg, 107int gk20a_tsg_bind_channel(struct tsg_gk20a *tsg,
108 struct channel_gk20a *ch) 108 struct channel_gk20a *ch)
109{ 109{
110 gk20a_dbg_fn(""); 110 struct gk20a *g = ch->g;
111
112 nvgpu_log_fn(g, " ");
111 113
112 /* check if channel is already bound to some TSG */ 114 /* check if channel is already bound to some TSG */
113 if (gk20a_is_channel_marked_as_tsg(ch)) { 115 if (gk20a_is_channel_marked_as_tsg(ch)) {
@@ -137,10 +139,10 @@ int gk20a_tsg_bind_channel(struct tsg_gk20a *tsg,
137 139
138 nvgpu_ref_get(&tsg->refcount); 140 nvgpu_ref_get(&tsg->refcount);
139 141
140 gk20a_dbg(gpu_dbg_fn, "BIND tsg:%d channel:%d\n", 142 nvgpu_log(g, gpu_dbg_fn, "BIND tsg:%d channel:%d\n",
141 tsg->tsgid, ch->chid); 143 tsg->tsgid, ch->chid);
142 144
143 gk20a_dbg_fn("done"); 145 nvgpu_log_fn(g, "done");
144 return 0; 146 return 0;
145} 147}
146 148
@@ -167,7 +169,7 @@ int gk20a_tsg_unbind_channel(struct channel_gk20a *ch)
167 nvgpu_ref_put(&tsg->refcount, gk20a_tsg_release); 169 nvgpu_ref_put(&tsg->refcount, gk20a_tsg_release);
168 ch->tsgid = NVGPU_INVALID_TSG_ID; 170 ch->tsgid = NVGPU_INVALID_TSG_ID;
169 171
170 gk20a_dbg(gpu_dbg_fn, "UNBIND tsg:%d channel:%d\n", 172 nvgpu_log(g, gpu_dbg_fn, "UNBIND tsg:%d channel:%d\n",
171 tsg->tsgid, ch->chid); 173 tsg->tsgid, ch->chid);
172 174
173 return 0; 175 return 0;
@@ -204,7 +206,7 @@ int gk20a_tsg_set_runlist_interleave(struct tsg_gk20a *tsg, u32 level)
204 struct gk20a *g = tsg->g; 206 struct gk20a *g = tsg->g;
205 int ret; 207 int ret;
206 208
207 gk20a_dbg(gpu_dbg_sched, "tsgid=%u interleave=%u", tsg->tsgid, level); 209 nvgpu_log(g, gpu_dbg_sched, "tsgid=%u interleave=%u", tsg->tsgid, level);
208 210
209 switch (level) { 211 switch (level) {
210 case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW: 212 case NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW:
@@ -227,7 +229,7 @@ int gk20a_tsg_set_timeslice(struct tsg_gk20a *tsg, u32 timeslice)
227{ 229{
228 struct gk20a *g = tsg->g; 230 struct gk20a *g = tsg->g;
229 231
230 gk20a_dbg(gpu_dbg_sched, "tsgid=%u timeslice=%u us", tsg->tsgid, timeslice); 232 nvgpu_log(g, gpu_dbg_sched, "tsgid=%u timeslice=%u us", tsg->tsgid, timeslice);
231 233
232 return g->ops.fifo.tsg_set_timeslice(tsg, timeslice); 234 return g->ops.fifo.tsg_set_timeslice(tsg, timeslice);
233} 235}
@@ -300,7 +302,7 @@ struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g, pid_t pid)
300 } 302 }
301 } 303 }
302 304
303 gk20a_dbg(gpu_dbg_fn, "tsg opened %d\n", tsg->tsgid); 305 nvgpu_log(g, gpu_dbg_fn, "tsg opened %d\n", tsg->tsgid);
304 306
305 return tsg; 307 return tsg;
306 308
@@ -343,7 +345,7 @@ void gk20a_tsg_release(struct nvgpu_ref *ref)
343 345
344 tsg->runlist_id = ~0; 346 tsg->runlist_id = ~0;
345 347
346 gk20a_dbg(gpu_dbg_fn, "tsg released %d\n", tsg->tsgid); 348 nvgpu_log(g, gpu_dbg_fn, "tsg released %d\n", tsg->tsgid);
347} 349}
348 350
349struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch) 351struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch)