Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd52875b authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Add fill_driver_data function to kgsl_sync_timeline_ops



Add fill_driver_data function to kgsl_sync_timeline_ops so that
userspace can see the timestamp of a KGSL sync point which will
help debug fence timeout issues.

CRs-Fixed: 680988
Change-Id: Ib5eff1fc727b6423903f15ff3cc70aedd06b4f37
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent a0bba46a
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -244,6 +244,18 @@ static void kgsl_sync_pt_value_str(struct sync_pt *sync_pt,
	snprintf(str, size, "%u", kpt->timestamp);
}

static int kgsl_sync_fill_driver_data(struct sync_pt *sync_pt, void *data,
					int size)
{
	struct kgsl_sync_pt *kpt = (struct kgsl_sync_pt *) sync_pt;

	if (size < sizeof(kpt->timestamp))
		return -ENOMEM;

	memcpy(data, &kpt->timestamp, sizeof(kpt->timestamp));
	return sizeof(kpt->timestamp);
}

static void kgsl_sync_timeline_release_obj(struct sync_timeline *sync_timeline)
{
	/*
@@ -260,6 +272,7 @@ static const struct sync_timeline_ops kgsl_sync_timeline_ops = {
	.compare = kgsl_sync_pt_compare,
	.timeline_value_str = kgsl_sync_timeline_value_str,
	.pt_value_str = kgsl_sync_pt_value_str,
	.fill_driver_data = kgsl_sync_fill_driver_data,
	.release_obj = kgsl_sync_timeline_release_obj,
};