• Qiang Ma's avatar
    drm/radeon: fix UVD suspend error · dfd6879b
    Qiang Ma authored
    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: default avatarLeo Liu <leo.liu@amd.com>
    Signed-off-by: default avatarQiang Ma <maqianga@uniontech.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    dfd6879b
cik.c 279 KB