Skip to content

Commit

Permalink
drm/radeon/dpm/rs780: add some sanity checking to sclk scaling
Browse files Browse the repository at this point in the history
Since the clock scaling is based on fb divider adjustments,
make sure the other pll parameters are the same.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
  • Loading branch information
Alex Deucher committed Sep 16, 2013
1 parent c3eaa08 commit ce7b30e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/radeon/rs780_dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,12 @@ static int rs780_set_engine_clock_scaling(struct radeon_device *rdev,
if (ret)
return ret;

if ((min_dividers.ref_div != max_dividers.ref_div) ||
(min_dividers.post_div != max_dividers.post_div) ||
(max_dividers.ref_div != current_max_dividers.ref_div) ||
(max_dividers.post_div != current_max_dividers.post_div))
return -EINVAL;

rs780_force_fbdiv(rdev, max_dividers.fb_div);

if (max_dividers.fb_div > min_dividers.fb_div) {
Expand Down

0 comments on commit ce7b30e

Please sign in to comment.