msm: kgsl: Add missing syncpoint_fence/expire trace
Add missing syncpoint_fence and syncpoint_fence_expire trace for syncpoint timeline event. Change-Id: If437217e52c10a5a911cb04197213d3b7835ed4b Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
This commit is contained in:
parent
58b018ec79
commit
84835ce299
@ -262,12 +262,40 @@ static void drawobj_sync_timeline_fence_work(struct irq_work *work)
|
||||
kgsl_drawobj_put(&event->syncobj->base);
|
||||
}
|
||||
|
||||
static void trace_syncpoint_timeline_fence(struct kgsl_drawobj_sync *syncobj,
|
||||
struct dma_fence *f, bool expire)
|
||||
{
|
||||
struct dma_fence_array *array = to_dma_fence_array(f);
|
||||
struct dma_fence **fences = &f;
|
||||
u32 num_fences = 1;
|
||||
int i;
|
||||
|
||||
if (array) {
|
||||
num_fences = array->num_fences;
|
||||
fences = array->fences;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_fences; i++) {
|
||||
char fence_name[KGSL_FENCE_NAME_LEN];
|
||||
|
||||
snprintf(fence_name, sizeof(fence_name), "%s:%llu",
|
||||
fences[i]->ops->get_timeline_name(fences[i]),
|
||||
fences[i]->seqno);
|
||||
if (expire)
|
||||
trace_syncpoint_fence_expire(syncobj, fence_name);
|
||||
else
|
||||
trace_syncpoint_fence(syncobj, fence_name);
|
||||
}
|
||||
}
|
||||
|
||||
static void drawobj_sync_timeline_fence_callback(struct dma_fence *f,
|
||||
struct dma_fence_cb *cb)
|
||||
{
|
||||
struct kgsl_drawobj_sync_event *event = container_of(cb,
|
||||
struct kgsl_drawobj_sync_event, cb);
|
||||
|
||||
trace_syncpoint_timeline_fence(event->syncobj, f, true);
|
||||
|
||||
/*
|
||||
* Mark the event as synced and then fire off a worker to handle
|
||||
* removing the fence
|
||||
@ -494,9 +522,11 @@ static int drawobj_add_sync_timeline(struct kgsl_device *device,
|
||||
}
|
||||
|
||||
kgsl_drawobj_put(drawobj);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
trace_syncpoint_timeline_fence(event->syncobj, event->fence, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int drawobj_add_sync_fence(struct kgsl_device *device,
|
||||
|
Loading…
Reference in New Issue
Block a user