I'm thinking of organizing power management in KMS. There are my
ideas, would like to get your opinions.

First of all we need a few different power modes. I think radeonhd has
nice states for that:
1) OFF /* DPMS off */
2) IDLE /* DPMS on, no activity for some time */
3) SLOW_2D /* Simple 2D activity */
4) FAST_2D /* Advanced 2D activity, e.g. video playback */
5) SLOW_3D /* Simple 3D activity, e.g. compiz (Q: how to select?
indirect rendering only? */
6) FAST_3D /*Fast 3D activity, e.g. games. Usually using default
AtomBIOS setting. */
7) MAX /* Use theoretical chip maximum, maybe beyond default - not
selected automatically */

Filling states with engine/memory/voltage values can be grabbed from radeonhd.

About setting states I see 3 ways:

1) Every part (2D, 3D, DPMS) call generic function radeon_pikcup_pm().
That function asks 2D engine, 3D engine and DPMS for current state and
pickups the best solution.
Implementation:
We have to introduce radeon_state_of_2d(), radeon_state_of_3d(),
radeon_state_of_dpms().

2) From every part (2D, 3D, DPMS) we call setting function with proper
argument. Examples:
3D engine calls radeon_set_pm(FAST_3D);
2D engine calls radeon_set_pm(SLOW_2D);
DPMS calls radeon_set_pm(IDLE);
DPMS calls radeon_set_pm(WAKE_UP);
Implementation:
We have to store each element's state in our power manager. If we get
"SLOW_2D", but FAST_3D is still running, we can not downclock.

3) We have some state properties in radeon_device and every patch
calls generic function radeon_pikcup_pm().
Implementation:
We have to create some rdev->state_of_2d, rdev->state_of_3d,
rdev->state_of_dpms, and use that in radeon_pikcup_pm().

Personally I'm for third method.

Do you have some comments? Preferred method? Suggestions?

-- 
Rafał

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to