Skip to content

Commit

Permalink
drm/radeon/kms: suspend and resume audio stuff
Browse files Browse the repository at this point in the history
Fixes FDO bug #26214

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Rafał Miłecki authored and Dave Airlie committed Feb 5, 2010
1 parent 5ff5571 commit 38fd2c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions drivers/gpu/drm/radeon/r600.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,13 +1950,21 @@ int r600_resume(struct radeon_device *rdev)
DRM_ERROR("radeon: failled testing IB (%d).\n", r);
return r;
}

r = r600_audio_init(rdev);
if (r) {
DRM_ERROR("radeon: audio resume failed\n");
return r;
}

return r;
}

int r600_suspend(struct radeon_device *rdev)
{
int r;

r600_audio_fini(rdev);
/* FIXME: we should wait for ring to be empty */
r600_cp_stop(rdev);
rdev->cp.ready = false;
Expand Down
3 changes: 1 addition & 2 deletions drivers/gpu/drm/radeon/r600_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ void r600_audio_fini(struct radeon_device *rdev)
if (!r600_audio_chipset_supported(rdev))
return;

WREG32_P(R600_AUDIO_ENABLE, 0x0, ~0x81000000);

del_timer(&rdev->audio_timer);
WREG32_P(R600_AUDIO_ENABLE, 0x0, ~0x81000000);
}

0 comments on commit 38fd2c6

Please sign in to comment.