summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_clocks.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-08-10 12:33:20 -0400
committerDave Airlie <airlied@redhat.com>2010-08-30 09:51:20 +1000
commit8807286e569c4f12fa2bc980187f3e2abc606d11 (patch)
tree12ab5b955ef6a67d3ba05cd1eb1895dd972f09d5 /drivers/gpu/drm/radeon/radeon_clocks.c
parent2bfc96a127bc1cc94d26bfaa40159966064f9c8c (diff)
downloadlwn-8807286e569c4f12fa2bc980187f3e2abc606d11.tar.gz
lwn-8807286e569c4f12fa2bc980187f3e2abc606d11.zip
drm/radeon/kms: use tracked values for sclk and mclk
Rather than calling get_memory_clock and get_engine_clock, used the tracked values from the pm code. Calling the tables adds additional latency in the modesetting and pm paths. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_clocks.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_clocks.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_clocks.c b/drivers/gpu/drm/radeon/radeon_clocks.c
index 14448a740ba6..690d8907135a 100644
--- a/drivers/gpu/drm/radeon/radeon_clocks.c
+++ b/drivers/gpu/drm/radeon/radeon_clocks.c
@@ -327,6 +327,14 @@ void radeon_get_clock_info(struct drm_device *dev)
mpll->max_feedback_div = 0xff;
mpll->best_vco = 0;
+ if (!rdev->clock.default_sclk)
+ rdev->clock.default_sclk = radeon_get_engine_clock(rdev);
+ if ((!rdev->clock.default_mclk) && rdev->asic->get_memory_clock)
+ rdev->clock.default_mclk = radeon_get_memory_clock(rdev);
+
+ rdev->pm.current_sclk = rdev->clock.default_sclk;
+ rdev->pm.current_mclk = rdev->clock.default_mclk;
+
}
/* 10 khz */