summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2017-09-13 18:48:48 +0100
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2017-11-22 11:18:55 +0000
commit19c99246827587a9570a1aa71ee1e49c39acaa8d (patch)
treee7fe25bb9c20aa79e71273793445fdb5c5937d91
parent0f86d5976e6152f94cf8245a9d16f671dbaa9671 (diff)
intel-gpu-overlay: Fix interrupts PMU readout
v2: Use correct address of. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--overlay/gem-interrupts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/overlay/gem-interrupts.c b/overlay/gem-interrupts.c
index a84aef03..5bd8656e 100644
--- a/overlay/gem-interrupts.c
+++ b/overlay/gem-interrupts.c
@@ -136,8 +136,12 @@ int gem_interrupts_update(struct gem_interrupts *irqs)
else
val = ret;
} else {
- if (read(irqs->fd, &val, sizeof(val)) < 0)
+ uint64_t data[2];
+
+ if (read(irqs->fd, data, sizeof(data)) < 0)
return irqs->error = errno;
+
+ val = data[0];
}
update = irqs->last_count == 0;