]> git.itanic.dy.fi Git - linux-stable/commit
drm/amdgpu: avoid over-handle of fence driver fini in s3 test (v2)
authorGuchun Chen <guchun.chen@amd.com>
Thu, 29 Jul 2021 10:35:13 +0000 (18:35 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Aug 2021 01:17:58 +0000 (21:17 -0400)
commit067f44c8b4590c3f24d21a037578a478590f2175
treeb38bd666e7d511d18cc379453fce4ddbbe9c8352
parenta38414335d7d94aec647a5b94f624b125c3418c2
drm/amdgpu: avoid over-handle of fence driver fini in s3 test (v2)

In amdgpu_fence_driver_hw_fini, no need to call drm_sched_fini to stop
scheduler in s3 test, otherwise, fence related failure will arrive
after resume. To fix this and for a better clean up, move drm_sched_fini
from fence_hw_fini to fence_sw_fini, as it's part of driver shutdown, and
should never be called in hw_fini.

v2: rename amdgpu_fence_driver_init to amdgpu_fence_driver_sw_init,
to keep sw_init and sw_fini paired.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1668
Fixes: 8d35a2596164c1 ("drm/amdgpu: adjust fence driver enable sequence")
Suggested-by: Christian König <christian.koenig@amd.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Guchun Chen <guchun.chen@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
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h