anv: pass context to reset stats helper
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8667>
This commit is contained in:

committed by
Marge Bot

parent
e2cd83fbc5
commit
34721e2af4
@@ -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");
|
||||
|
@@ -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,
|
||||
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;
|
||||
|
@@ -172,7 +172,7 @@ anv_gem_has_context_priority(int fd)
|
||||
}
|
||||
|
||||
int
|
||||
anv_gem_gpu_get_reset_stats(struct anv_device *device,
|
||||
anv_gem_context_get_reset_stats(int fd, int context,
|
||||
uint32_t *active, uint32_t *pending)
|
||||
{
|
||||
unreachable("Unused");
|
||||
|
@@ -1606,7 +1606,7 @@ 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,
|
||||
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);
|
||||
|
Reference in New Issue
Block a user