• Evan Quan's avatar
    drm/amdgpu: put the audio codec into suspend state before gpu reset V3 · 3f12acc8
    Evan Quan authored
    At default, the autosuspend delay of audio controller is 3S. If the
    gpu reset is triggered within 3S(after audio controller idle),
    the audio controller may be unable into suspended state. Then
    the sudden gpu reset will cause some audio errors. The change
    here is targeted to resolve this.
    
    However if the audio controller is in use when the gpu reset
    triggered, this change may be still not enough to put the
    audio controller into suspend state. Under this case, the
    gpu reset will still proceed but there will be a warning
    message printed("failed to suspend display audio").
    
    V2: limit this for BACO and mode1 reset only
    V3: try 1st to use pm_runtime_autosuspend_expiration() to
        query how much time is left. Use default setting on
        failure
    Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
    Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    3f12acc8
amdgpu_device.c 122 KB