Module: Mesa
Branch: master
Commit: bd9672695b6b95085bb0af1d8eec9b550cdb01e6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd9672695b6b95085bb0af1d8eec9b550cdb01e6

Author: Lionel Landwerlin <lionel.g.landwer...@intel.com>
Date:   Wed Feb  7 10:48:32 2018 +0000

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 <lionel.g.landwer...@intel.com>
Cc: <mesa-sta...@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com>

---

 src/mesa/drivers/dri/i965/brw_performance_query.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c 
b/src/mesa/drivers/dri/i965/brw_performance_query.c
index c0bb4442be..613e61653f 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;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to