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>
This commit is contained in:
Thomas Fleury
2016-04-28 09:58:14 -07:00
committed by Terje Bergstrom
parent f71ac07972
commit 57a59616b5

View File

@@ -62,9 +62,6 @@ struct gk20a_fecs_trace {
DECLARE_HASHTABLE(pid_hash_table, GK20A_FECS_TRACE_HASH_BITS);
struct mutex hash_lock;
struct mutex poll_lock;
u64 sof;
u32 sof_mask; /* did we already send a SOF for this VM */
struct task_struct *poll_task;
};
@@ -271,18 +268,6 @@ static int gk20a_fecs_trace_ring_read(struct gk20a *g, int index)
entry.context_id = r->context_id;
entry.vmid = vmid;
/* insert SOF event if needed */
if (!(trace->sof_mask & BIT(vmid))) {
entry.tag = NVGPU_CTXSW_TAG_SOF;
entry.timestamp = trace->sof;
entry.context_id = 0;
entry.pid = 0;
gk20a_dbg(gpu_dbg_ctxsw, "SOF time=%llx", entry.timestamp);
gk20a_ctxsw_trace_write(g, &entry);
trace->sof_mask |= BIT(vmid);
}
/* break out FECS record into trace events */
for (i = 0; i < gk20a_fecs_trace_num_ts(); i++) {
@@ -364,9 +349,6 @@ static int gk20a_fecs_trace_poll(struct gk20a *g)
"circular buffer: read=%d (mailbox=%d) write=%d cnt=%d",
read, gk20a_fecs_trace_get_read_index(g), write, cnt);
/* we did not send any SOF yet */
trace->sof_mask = 0;
/* consume all records */
while (read != write) {
gk20a_fecs_trace_ring_read(g, read);
@@ -377,13 +359,6 @@ static int gk20a_fecs_trace_poll(struct gk20a *g)
}
done:
/*
* OK, we read out all the entries... a new "frame" starts here.
* We remember the Start Of Frame time and insert it on the next
* iteration.
*/
trace->sof = gk20a_read_ptimer(g);
mutex_unlock(&trace->poll_lock);
gk20a_idle(g->dev);
return err;