amdgpu,radeon: add needs_reset param to ctx_query_reset_status
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 9 Apr 2021 16:04:56 +0000 (18:04 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 14 Apr 2021 07:00:00 +0000 (07:00 +0000)
commitbc71f689f1f5224d90f01cb8276b68e56107cb43
tree574140303264a0b34214293350b370c06b6b2aa3
parent3a56f06998223ab8f9fc351cd1051d54f3ae6022
amdgpu,radeon: add needs_reset param to ctx_query_reset_status

The kernel can do different types of recovery (soft recovery, GPU reset).

Since they both increase gpu_reset_counter, this will cause all contexts
to report AMDGPU_CTX_QUERY2_FLAGS_RESET, which is a bit misleading: if
a single context was soft-recovered, the others are fine and we don't need
special processing.

This commit uses the AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST to distinguish
between the 2 kind of reset and later commits will use this information.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10179>
src/gallium/drivers/r600/r600_pipe_common.c
src/gallium/drivers/radeon/radeon_winsys.h
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
src/gallium/winsys/radeon/drm/radeon_drm_cs.c