diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 3804785c9a9..566d5dbe7b3 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3347,7 +3347,8 @@ anv_device_query_status(struct anv_device *device) return VK_ERROR_DEVICE_LOST; uint32_t active, pending; - int ret = anv_gem_gpu_get_reset_stats(device, &active, &pending); + int ret = anv_gem_context_get_reset_stats(device->fd, device->context_id, + &active, &pending); if (ret == -1) { /* We don't know the real error. */ return anv_device_set_lost(device, "get_reset_stats failed: %m"); diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index 4c43f5f77b4..7cd37d60e27 100644 --- a/src/intel/vulkan/anv_gem.c +++ b/src/intel/vulkan/anv_gem.c @@ -416,14 +416,14 @@ anv_gem_get_context_param(int fd, int context, uint32_t param, uint64_t *value) } int -anv_gem_gpu_get_reset_stats(struct anv_device *device, - uint32_t *active, uint32_t *pending) +anv_gem_context_get_reset_stats(int fd, int context, + uint32_t *active, uint32_t *pending) { struct drm_i915_reset_stats stats = { - .ctx_id = device->context_id, + .ctx_id = context, }; - int ret = gen_ioctl(device->fd, DRM_IOCTL_I915_GET_RESET_STATS, &stats); + int ret = gen_ioctl(fd, DRM_IOCTL_I915_GET_RESET_STATS, &stats); if (ret == 0) { *active = stats.batch_active; *pending = stats.batch_pending; diff --git a/src/intel/vulkan/anv_gem_stubs.c b/src/intel/vulkan/anv_gem_stubs.c index 35285c08d71..699502ad618 100644 --- a/src/intel/vulkan/anv_gem_stubs.c +++ b/src/intel/vulkan/anv_gem_stubs.c @@ -172,8 +172,8 @@ anv_gem_has_context_priority(int fd) } int -anv_gem_gpu_get_reset_stats(struct anv_device *device, - uint32_t *active, uint32_t *pending) +anv_gem_context_get_reset_stats(int fd, int context, + uint32_t *active, uint32_t *pending) { unreachable("Unused"); } diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 0d258b6973b..005f458da03 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1606,8 +1606,8 @@ int anv_gem_get_param(int fd, uint32_t param); uint64_t anv_gem_get_drm_cap(int fd, uint32_t capability); int anv_gem_get_tiling(struct anv_device *device, uint32_t gem_handle); bool anv_gem_get_bit6_swizzle(int fd, uint32_t tiling); -int anv_gem_gpu_get_reset_stats(struct anv_device *device, - uint32_t *active, uint32_t *pending); +int anv_gem_context_get_reset_stats(int fd, int context, + uint32_t *active, uint32_t *pending); int anv_gem_handle_to_fd(struct anv_device *device, uint32_t gem_handle); int anv_gem_reg_read(int fd, uint32_t offset, uint64_t *result); uint32_t anv_gem_fd_to_handle(struct anv_device *device, int fd);