Skip to content

Commit

Permalink
drm/radeon: properly handle cg on asics without UVD
Browse files Browse the repository at this point in the history
Don't try and enable clockgating if the asic doesn't have
UVD.  Use rdev->has_uvd rather than using local checks.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Alex Deucher committed Jul 29, 2013
1 parent 46348dc commit b2d7091
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/gpu/drm/radeon/si.c
Original file line number Diff line number Diff line change
Expand Up @@ -5215,24 +5215,20 @@ static void si_enable_mc_ls(struct radeon_device *rdev,

static void si_init_cg(struct radeon_device *rdev)
{
bool has_uvd = true;

si_enable_mgcg(rdev, true);
si_enable_cgcg(rdev, true);
/* disable MC LS on Tahiti */
if (rdev->family == CHIP_TAHITI)
si_enable_mc_ls(rdev, false);
if (has_uvd) {
if (rdev->has_uvd) {
si_enable_uvd_mgcg(rdev, true);
si_init_uvd_internal_cg(rdev);
}
}

static void si_fini_cg(struct radeon_device *rdev)
{
bool has_uvd = true;

if (has_uvd)
if (rdev->has_uvd)
si_enable_uvd_mgcg(rdev, false);
si_enable_cgcg(rdev, false);
si_enable_mgcg(rdev, false);
Expand Down

0 comments on commit b2d7091

Please sign in to comment.