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");
}
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;
}
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");
}
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);