]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix a race in GPU reset with IB test (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 28 May 2019 19:17:25 +0000 (14:17 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Jun 2019 03:18:09 +0000 (22:18 -0500)
commitab248e9b88a81df419d83bc5c8f7f5900731c74f
tree1cb8bd2320c07fdae0fd9f5034524d44d9ee4cb5
parent9081bed3c0ee6d3b64185e827357ed80bef85e1c
drm/amdgpu: fix a race in GPU reset with IB test (v2)

Split late_init into two functions, one (do_late_init) which
just does the hw init, and late_init which calls do_late_init
and schedules the IB test work.  Call do_late_init in
the GPU reset code to run the init code, but not schedule
the IB test code.  The IB test code is called directly
in the gpu reset code so no need to run the IB tests
in a separate work thread.  If we do, we end up racing.

v2: Rework late_init.  Pull out the mgpu fan boost and xgmi
pstate code into late_init so they get called in all cases.
rename the late_init worker thread to delayed work since it's
just the IB tests now which can happen later.  Schedule the
work at init and resume time.  It's not needed at reset time
because the IB tests are called directly.

Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: Xinhui Pan <xinhui.pan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c