]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Destroy psp ring in hw_fini
authorTrigger Huang <trigger.huang@amd.com>
Mon, 17 Apr 2017 12:50:18 +0000 (08:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:32:46 +0000 (17:32 -0400)
commit2b0a4ab30083de41c6b729b3a0f4e10095089fc1
tree4744dcbe1056d3eff2483644183dc3de4d06af74
parentf21afccbeda536eedb2f4fe6cebedb2dd5c992b0
drm/amdgpu: Destroy psp ring in hw_fini

Fix issue that PSP initialization will fail if reload amdgpu module.
That's because the PSP ring must be destroyed to be ready for the
next time PSP initialization.

Changes in v2:
- Move psp_ring_destroy before all BOs free (suggested by
  Ray Huang).
Changes in v3:
- Check firmware load type, if it is not PSP, we should do
  nothing in fw_fini(), and of course will not destroy
  PSP ring too (suggested by Ray Huang).

Signed-off-by: Trigger Huang <trigger.huang@amd.com>
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
drivers/gpu/drm/amd/amdgpu/psp_v3_1.h