summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-02-06 23:23:22 +0000
committerLionel Landwerlin <[email protected]>2018-02-08 10:51:40 +0000
commitbd6c0cab606fa0a3b821e50542ba06ff714292bf (patch)
treed8e9c9a151cb512723ce26e8acc652f6b24cfeeb /src/mesa
parent0f952b778f8a3f38f3310a736360a1cda2eec6ea (diff)
i965: perf: use drmIoctl() instead of ioctl()
ioctl() might be interrupted, use drmIoctl() instead as it'll retry automatically. Fixes: 27ee83eaf7e "i965: perf: add support for userspace configurations" Cc: "18.0" <[email protected]> Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Tested-by: Mark Janes <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_query.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index 5b8f30db2f8..f4ff858bd5d 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -1842,7 +1842,7 @@ kernel_has_dynamic_config_support(struct brw_context *brw,
config.n_mux_regs = 1;
config.mux_regs_ptr = (uintptr_t) mux_regs;
- if (ioctl(screen->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config_id) < 0 &&
+ if (drmIoctl(screen->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config_id) < 0 &&
errno == ENOENT)
return true;
@@ -1889,7 +1889,7 @@ init_oa_configs(struct brw_context *brw, const char *sysfs_dev_dir)
config.n_flex_regs = query->n_flex_regs;
config.flex_regs_ptr = (uintptr_t) query->flex_regs;
- ret = ioctl(screen->fd, DRM_IOCTL_I915_PERF_ADD_CONFIG, &config);
+ ret = drmIoctl(screen->fd, DRM_IOCTL_I915_PERF_ADD_CONFIG, &config);
if (ret < 0) {
DBG("Failed to load \"%s\" (%s) metrics set in kernel: %s\n",
query->name, query->guid, strerror(errno));