drm/amd/amdgpu: move inc gpu_reset_counter after drm_sched_stop
authorJingwen Chen <Jingwen.Chen2@amd.com>
Thu, 25 Feb 2021 09:08:02 +0000 (17:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Feb 2021 22:19:21 +0000 (17:19 -0500)
commit8f8c80f430096726a5d8701ca80564bce06fa8da
tree3e5d02546e010043d57da95417c9bc3276729ed1
parent8f4828d0a104d961d5eb850d0aef1530fc24e370
drm/amd/amdgpu: move inc gpu_reset_counter after drm_sched_stop

Move gpu_reset_counter after drm_sched_stop to avoid race
condition caused by job submitted between reset_count +1 and
drm_sched_stop.

Signed-off-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c