summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--overlay/gpu-perf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/overlay/gpu-perf.c b/overlay/gpu-perf.c
index d2f09f55..77511323 100644
--- a/overlay/gpu-perf.c
+++ b/overlay/gpu-perf.c
@@ -226,7 +226,7 @@ int gpu_perf_update(struct gpu_perf *gp)
rmb();
if (head < tail)
- tail = head; /* XXX */
+ head += size;
data = (uint8_t *)mmap + gp->page_size;
while (head - tail >= sizeof (struct perf_event_header)) {
@@ -262,7 +262,7 @@ int gpu_perf_update(struct gpu_perf *gp)
tail += header->size;
}
- mmap->data_tail = tail;
+ mmap->data_tail = tail & mask;
}
free(buffer);