[Intel-gfx] [PATCH i-g-t v2 4/9] intel-gpu-overlay: Fix interrupts PMU readout
Tvrtko Ursulin
tursulin at ursulin.net
Tue Oct 10 14:17:17 UTC 2017
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
v2: Use correct address of. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
---
overlay/gem-interrupts.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/overlay/gem-interrupts.c b/overlay/gem-interrupts.c
index a84aef0398a7..5bd8656e0e63 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;
--
2.9.5
More information about the Intel-gfx
mailing list