diff --git a/drivers/gpu/msm/kgsl_snapshot.c b/drivers/gpu/msm/kgsl_snapshot.c index c058e957366..2ee021f0a0d 100644 --- a/drivers/gpu/msm/kgsl_snapshot.c +++ b/drivers/gpu/msm/kgsl_snapshot.c @@ -518,6 +518,7 @@ int kgsl_device_snapshot(struct kgsl_device *device, int hang) struct kgsl_snapshot_header *header = device->snapshot; int remain = device->snapshot_maxsize - sizeof(*header); void *snapshot; + struct timespec boot; /* * The first hang is always the one we are interested in. To @@ -559,7 +560,13 @@ int kgsl_device_snapshot(struct kgsl_device *device, int hang) snapshot = device->ftbl->snapshot(device, snapshot, &remain, hang); - device->snapshot_timestamp = get_seconds(); + /* + * The timestamp is the seconds since boot so it is easier to match to + * the kernel log + */ + + getboottime(&boot); + device->snapshot_timestamp = get_seconds() - boot.tv_sec; device->snapshot_size = (int) (snapshot - device->snapshot); /* Freeze the snapshot on a hang until it gets read */ @@ -654,7 +661,7 @@ done: /* Show the timestamp of the last collected snapshot */ static ssize_t timestamp_show(struct kgsl_device *device, char *buf) { - return snprintf(buf, PAGE_SIZE, "%x\n", device->snapshot_timestamp); + return snprintf(buf, PAGE_SIZE, "%d\n", device->snapshot_timestamp); } /* manually trigger a new snapshot to be collected */