Bug 26145 - [KMS] PM patches: inconsistency between clock set and read
Summary: [KMS] PM patches: inconsistency between clock set and read
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: XOrg git
Hardware: x86 (IA32) Linux (All)
: medium minor
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-20 14:31 UTC by bjaglin
Modified: 2010-01-21 23:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
fix get_engine/memory clock functions (1.05 KB, patch)
2010-01-21 16:31 UTC, Alex Deucher
no flags Details | Splinter Review

Description bjaglin 2010-01-20 14:31:04 UTC
Using drm-radeon-testing + PM patches (http://people.freedesktop.org/~agd5f/pm/), PM is working just fine on my RV250 but shows inconsistent debug output: for low frequencies, the value read using debugfs is about half of the value set.

I have tried arbitrary frequencies (and not just the ones read from the table), and it looks like this weirdness is only reproducible when setting a frequency around half of the default frequency or below that, so I tend to think the problem is just reading the engine clock.

brice@leo:~/git/ubuntu-lucid$ dmesg | grep drm | head -n 20
[    1.275752] [drm] Initialized drm 1.1.0 20060810
[    1.588338] [drm] radeon defaulting to kernel modesetting.
[    1.588343] [drm] radeon kernel modesetting enabled.
[    1.592398] [drm] radeon: Initializing kernel modesetting.
[    1.592520] [drm] register mmio base: 0xC0100000
[    1.592523] [drm] register mmio size: 65536
[    1.592931] [drm] GPU reset succeed (RBBM_STATUS=0x00000140)
[    1.592943] [drm] 2 Power State(s)
[    1.592946] [drm] State 0 Battery 
[    1.592948] [drm] 	1 Clock Mode(s)
[    1.592950] [drm] 		0 engine/memory: 110000/110000
[    1.592953] [drm] State 1 Default (default)
[    1.592955] [drm] 	1 Clock Mode(s)
[    1.592958] [drm] 		0 engine/memory: 252000/200000
[    1.592970] [drm] radeon: dynamic power management enabled
[    1.592972] [drm] radeon: power management initialized
[    1.593077] [drm] radeon: VRAM 64M
[    1.593080] [drm] radeon: VRAM from 0x00000000 to 0x03FFFFFF
[    1.593082] [drm] radeon: GTT 256M
[    1.593085] [drm] radeon: GTT from 0xD0000000 to 0xDFFFFFFF

brice@leo:~/git/ubuntu-lucid$ dmesg | tail
[    9.432030] [drm] Requested: e: 25200 m: 20000 p: 16
[    9.632030] [drm] Setting: e: 25200 m: 20000 p: 16
[   10.532036] [drm] Requested: e: 11000 m: 11000 p: 0
[   10.732030] [drm] Setting: e: 11000 m: 11000 p: 0
[   14.808027] eth1: no IPv6 routers present
[   18.857279] lib80211_crypt: registered algorithm 'TKIP'
[ 3142.448034] [drm] Requested: e: 25200 m: 20000 p: 16
[ 3142.648138] [drm] Setting: e: 25200 m: 20000 p: 16
[ 3143.048056] [drm] Requested: e: 11000 m: 11000 p: 0
[ 3143.248056] [drm] Setting: e: 11000 m: 11000 p: 0

brice@leo:~/git/ubuntu-lucid$ cat /sys/kernel/debug/dri/0/radeon_pm_info
state: PM_STATE_ACTIVE
default engine clock: 252000 kHz
current engine clock: 55120 kHz
default memory clock: 200000 kHz
current memory clock: 200250 kHz
Comment 1 Alex Deucher 2010-01-21 16:31:55 UTC
Created attachment 32759 [details] [review]
fix get_engine/memory clock functions

This patch should do the trick.
Comment 2 bjaglin 2010-01-21 23:13:40 UTC
It does, thanks. With the patch, the engine clock is now read correctly even for low frequencies.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.