summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
diff options
context:
space:
mode:
authorBokun Zhang <Bokun.Zhang@amd.com>2022-10-07 02:08:38 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-10-10 17:32:55 -0400
commite5da651985be20616a9e0662032e0ea2ee4dd468 (patch)
tree7a622b846065a0fafdd8db5e6e35f81caf236e3f /drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
parent9799702360d51a714e888fef4ab5fb9123dfb41f (diff)
downloadlinux-e5da651985be20616a9e0662032e0ea2ee4dd468.tar.bz2
drm/amdgpu: Fix SDMA engine resume issue under SRIOV
- Under SRIOV, SDMA engine is shared between VFs. Therefore, we will not stop SDMA during hw_fini. This is not an issue with normal dirver loading and unloading. - However, when we put the SDMA engine to suspend state and resume it, the issue starts to show up. Something could attempt to use that SDMA engine to clear or move memory before the engine is initialized since the DRM entity is still there. - Therefore, we will call sdma_v5_2_enable(false) during hw_fini, and if we are under SRIOV, we will call sdma_v5_2_enable(true) afterwards to allow other VFs to use SDMA. This way, the DRM entity of SDMA engine is emptied and it will follow the flow of resume code path. Tested-by: Bokun Zhang <Bokun.Zhang@amd.com> Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c')
0 files changed, 0 insertions, 0 deletions