summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
index edddcdc1..52166b7f 100644
--- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c
@@ -62,9 +62,6 @@ struct gk20a_fecs_trace {
62 DECLARE_HASHTABLE(pid_hash_table, GK20A_FECS_TRACE_HASH_BITS); 62 DECLARE_HASHTABLE(pid_hash_table, GK20A_FECS_TRACE_HASH_BITS);
63 struct mutex hash_lock; 63 struct mutex hash_lock;
64 struct mutex poll_lock; 64 struct mutex poll_lock;
65 u64 sof;
66 u32 sof_mask; /* did we already send a SOF for this VM */
67
68 struct task_struct *poll_task; 65 struct task_struct *poll_task;
69}; 66};
70 67
@@ -271,18 +268,6 @@ static int gk20a_fecs_trace_ring_read(struct gk20a *g, int index)
271 entry.context_id = r->context_id; 268 entry.context_id = r->context_id;
272 entry.vmid = vmid; 269 entry.vmid = vmid;
273 270
274 /* insert SOF event if needed */
275 if (!(trace->sof_mask & BIT(vmid))) {
276 entry.tag = NVGPU_CTXSW_TAG_SOF;
277 entry.timestamp = trace->sof;
278 entry.context_id = 0;
279 entry.pid = 0;
280
281 gk20a_dbg(gpu_dbg_ctxsw, "SOF time=%llx", entry.timestamp);
282 gk20a_ctxsw_trace_write(g, &entry);
283 trace->sof_mask |= BIT(vmid);
284 }
285
286 /* break out FECS record into trace events */ 271 /* break out FECS record into trace events */
287 for (i = 0; i < gk20a_fecs_trace_num_ts(); i++) { 272 for (i = 0; i < gk20a_fecs_trace_num_ts(); i++) {
288 273
@@ -364,9 +349,6 @@ static int gk20a_fecs_trace_poll(struct gk20a *g)
364 "circular buffer: read=%d (mailbox=%d) write=%d cnt=%d", 349 "circular buffer: read=%d (mailbox=%d) write=%d cnt=%d",
365 read, gk20a_fecs_trace_get_read_index(g), write, cnt); 350 read, gk20a_fecs_trace_get_read_index(g), write, cnt);
366 351
367 /* we did not send any SOF yet */
368 trace->sof_mask = 0;
369
370 /* consume all records */ 352 /* consume all records */
371 while (read != write) { 353 while (read != write) {
372 gk20a_fecs_trace_ring_read(g, read); 354 gk20a_fecs_trace_ring_read(g, read);
@@ -377,13 +359,6 @@ static int gk20a_fecs_trace_poll(struct gk20a *g)
377 } 359 }
378 360
379done: 361done:
380 /*
381 * OK, we read out all the entries... a new "frame" starts here.
382 * We remember the Start Of Frame time and insert it on the next
383 * iteration.
384 */
385 trace->sof = gk20a_read_ptimer(g);
386
387 mutex_unlock(&trace->poll_lock); 362 mutex_unlock(&trace->poll_lock);
388 gk20a_idle(g->dev); 363 gk20a_idle(g->dev);
389 return err; 364 return err;