diff options
author | Qiang Ma <maqianga@uniontech.com> | 2022-01-17 08:47:31 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-01-18 23:43:36 +0100 |
commit | dfd6879b98999867ac860a51348b00b5c0c2cafd (patch) | |
tree | 02c41950dc3dcf3c15e55ef51141b175c2b86a5f /drivers/gpu/drm/radeon/ni.c | |
parent | drm/amdgpu: Add missing pm_runtime_put_autosuspend (diff) | |
download | linux-dfd6879b98999867ac860a51348b00b5c0c2cafd.tar.xz linux-dfd6879b98999867ac860a51348b00b5c0c2cafd.zip |
drm/radeon: fix UVD suspend error
I met a bug recently and the kernel log:
[ 330.171875] radeon 0000:03:00.0: couldn't schedule ib
[ 330.175781] [drm:radeon_uvd_suspend [radeon]] *ERROR* Error destroying UVD (-22)!
In radeon drivers, using UVD suspend is as follows:
if (rdev->has_uvd) {
uvd_v1_0_fini(rdev);
radeon_uvd_suspend(rdev);
}
In radeon_ib_schedule function, we check the 'ring->ready' state,
but in uvd_v1_0_fini funciton, we've cleared the ready state.
So, just modify the suspend code flow to fix error.
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/ni.c')
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 4a364ca7a1be..927e5f42e97d 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -2323,8 +2323,8 @@ int cayman_suspend(struct radeon_device *rdev) cayman_cp_enable(rdev, false); cayman_dma_stop(rdev); if (rdev->has_uvd) { - uvd_v1_0_fini(rdev); radeon_uvd_suspend(rdev); + uvd_v1_0_fini(rdev); } evergreen_irq_suspend(rdev); radeon_wb_disable(rdev); |