drm/amdgpu: Fix GPU reset error.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 4 Mar 2020 21:36:42 +0000 (16:36 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Mar 2020 19:32:24 +0000 (14:32 -0500)
commit90f88cdd7c8d6a6a3be18353d6a03798f9a03168
tree901c12d9e8065a884f8030f38d1419933071b9e7
parent5e208eb62bb308ebf70fd03145c54215d72e7ba6
drm/amdgpu: Fix GPU reset error.

Problem:
During GU reset PSP's sysfs was being wrongly reinitilized
during call to amdgpu_device_ip_late_init which was failing
with duplicate error.
Fix:
Move psp_sysfs_init to psp_sw_init to avoid this. Add guards
in sysfs file's read and write hook agains premature call
if PSP is not finished initialization.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c