summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-02-07 10:48:32 +0000
committerLionel Landwerlin <[email protected]>2018-02-23 01:44:07 +0000
commitbd9672695b6b95085bb0af1d8eec9b550cdb01e6 (patch)
treeb9e12df9a1ec3315ad78791da049369f5bb52621 /src/mesa/drivers
parent032870bedad1fa6c367935dfc7f661d3698c21b1 (diff)
i965: perf: ensure reading config IDs from sysfs isn't interrupted
Fixes: 458468c136e "i965: Expose OA counters via INTEL_performance_query" Signed-off-by: Lionel Landwerlin <[email protected]> Cc: <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_query.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index c0bb4442bec..613e61653fe 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -1720,7 +1720,8 @@ read_file_uint64(const char *file, uint64_t *val)
fd = open(file, 0);
if (fd < 0)
return false;
- n = read(fd, buf, sizeof (buf) - 1);
+ while ((n = read(fd, buf, sizeof (buf) - 1)) < 0 &&
+ errno == EINTR);
close(fd);
if (n < 0)
return false;