summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2016-04-28 12:58:14 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-21 14:33:56 -0400
commit57a59616b596d4d7b134ab8a32a4ab7cdfa15f3d (patch)
treea1a2baebf15fcf879ce817316e67f505f63da0b8 /drivers
parentf71ac07972c5818cca9a652ca649b61d6572dc9b (diff)
gpu: nvgpu: remove SOF event generation
FECS trace are currently collected using periodic polling every 16.66 ms. Whenever polling thread finds some events from FECS, it generates a SOF event with current PTIMER value. These events may introduce out of order timestamps, and extra processing would be required in driver to insert them in the right order. This change removes SOF event generation, as they is currently no use case for them. Bug 1757714 Change-Id: I4343e3b6ab0f0ce03d89244b3195115b3e4a2802 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1139307 (cherry picked from commit 10f0df0a100709ff6fd2cf4ed59f1b04fda837da) Reviewed-on: http://git-master/r/1150049 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Richard Zhao <rizhao@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-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;