Case Study ATI Device Power Management In Windows















![Implementation Details Example: Installing a power setting [Device. Name] Add. Power. Setting=Ati. Power. Policy Implementation Details Example: Installing a power setting [Device. Name] Add. Power. Setting=Ati. Power. Policy](https://slidetodoc.com/presentation_image_h2/f72ac32ccd7ceaa61d0f247e54a322a4/image-16.jpg)














- Slides: 30

Case Study: ATI Device Power Management In Windows Vista Phil Mummah Software Architect ATI

Agenda Device power management Overview ATI Power. Play. TM technology Integrating with Windows Vista Power Manager Windows Vista enhancements Implementation details Demo Summary Additional resources

Power Management Overview Device Run time idle detection Transition an inactive device into a low power, non-working power state (e. g. , D 2) Wake and transition to D 0 on I/O traffic, interrupt Device-specific tradeoff of performance for reduced power consumption In the context of the device’s On state (D 0) Examples: scale device clock rates and core voltages, clock gating, vary transmit power or communication speed, etc. Device performance states Analogous to ACPI processor performance states Discrete combinations of power consumption and performance Application performance tradeoff for reduced power Reduce unnecessary activity in battery mode

Device Power Management Opportunities and goals Extend mobile PC battery life Customers want extended battery life and are willing to pay for it Differentiate your products Add significant value to your device Drive down system power consumption Reduce fan noise, system thermal output Equally applicable to mobile and desktop systems

Device Power Management Opportunities and goals Devices, services and applications all help to reduce system power consumption Watts 40 35 30 25 20 15 10 5 Max CPU Max LCD Max Animation Min LCD Min Animation

Device Power Management ATI Power. Play Reduces the power consumption of ATI Mobile Radeon. TM graphics devices When the device is idle When the system is running on battery Exposes API for OEM enhancements Offers users the optimal balance of performance and power consumption ATI Power. Play. TM drives continuing innovation and advancement in graphics power management Integrated with Windows Vista power management

Device Power Management ATI Power. Play capabilities GPU core voltage and frequency scaling Memory clock scaling Refresh rate reduction PCI Express dynamic lane width switching Thermal throttling …and more

Windows Vista Power Policy Benefits of integration Offers users a seamless power management experience Provide unified power management controls Allows the entire platform to respond to the user’s current power policy Devices automatically respond to changing system conditions Active power scheme/personality AC/DC power source changes

Windows Vista Power Policy Enhancements Extensible power setting store Devices or applications can define and install custom power settings Windows power manager stores setting data, friendly names, values, etc. All power settings appear in Windows Power Options Including custom third-party power settings No need to provide additional configuration UI Robust command-line tool for system administrator Makes testing, debugging easier

Windows Vista Power Policy User experience improvements Simplified power plans Three default power plans Power Saver, Automatic, High Performance Indicates the overall power management policy to the system Each plans has a personality setting Users can easily change the active power plans One-click from the desktop with the battery meter

Windows Vista Power Policy Steps to driver integration Define custom power policy settings Install custom power settings Prepare the device driver to Register for power events of interest Respond appropriately to these events Optionally, provide additional power management UI

Implementation Details Defining a power setting A custom power setting definition contains A GUID uniquely identifying the setting Friendly name, description strings One or more setting values Range, e. g. , 0 – 100% Value: 10 minutes Discrete values E. g. , {Enabled, Disabled}; {High, Medium, Low}

Implementation Details Defining a power setting Critical step: Define appropriate defaults Each power scheme personality’s defaults Users might not change the power policy for your power setting System power source (AC/DC) Each device can define multiple power settings Power settings can be placed in subgroups

Implementation Details Example: Defining a power setting GUID {191 F 65 B 5 -D 45 C-4 a 4 f-8 AAE-1 AB 8 BFD 980 E 6} Friendly Name “ATI Graphics Engine Power. Play” Description “Configures the GPU Power Management Mode” Values (discrete) ATI Max Performance Mode ATI Balanced Mode ATI Max Battery Mode Subgroup New subgroup created for all ATI Power. Play settings

Implementation Details Installing a power setting Add the setting and its definition to the power policy store Two methods supported INF-based installation Ideal for device drivers New INF directives for describing power setting, subgroup, possible values Multiple settings can be described in the same INF file API-based installation Win 32 APIs in Power Profiles Library (powrprof. dll)
![Implementation Details Example Installing a power setting Device Name Add Power SettingAti Power Policy Implementation Details Example: Installing a power setting [Device. Name] Add. Power. Setting=Ati. Power. Policy](https://slidetodoc.com/presentation_image_h2/f72ac32ccd7ceaa61d0f247e54a322a4/image-16.jpg)
Implementation Details Example: Installing a power setting [Device. Name] Add. Power. Setting=Ati. Power. Policy Power Setting Defined By GUID Setting Friendly Name, Description [Ati. Power. Policy] Subgroup = {2566 CF 20 -D 01 A-456 f-BFE 1 -C 6 C 6 E 76 D 15 A 6}, "ATI Graphics Main Power Settings", "Set all graphics power settings " Setting = {191 F 65 B 5 -D 45 C-4 a 4 f-8 AAE-1 AB 8 BFD 980 E 6}, “ATI Graphics Engine Power. Play Settings”, “Configures the GPU Power Management Mode” Value=0, "Max Battery Mode", "Minimum Power Setting", REG_DWORD, <0> Value=1, "Balanced Mode", "Medium Power Setting", REG_DWORD, <1> Value=2, "Max Performance Mode", "Max Power Setting", REG_DWORD, <2> Default Default = = = %GUID_MAX_POWER_SAVINGS%, %AC%, 1 %GUID_MAX_POWER_SAVINGS%, %DC%, 0 %GUID_TYPICAL_POWER_SAVINGS%, %AC%, 2 %GUID_TYPICAL_POWER_SAVINGS%, %DC%, 0 %GUID_MIN_POWER_SAVINGS%, %AC%, 2 %GUID_MIN_POWER_SAVINGS%, %DC%, 1 Discrete List of Values Default Values for Each Power Scheme Personality Range of Values can also be done, ie 0 – 100%

Implementation Details Register for notifications Register within device or application initialization code Po. Register. Power. Setting. Notification() Register with custom power setting GUID De-register when your device is stopped Kernel-mode registration function includes context parameter Most drivers will pass device extension in context Enables drivers to handle registration for multiple devices

Implementation Details Example: Register for notifications KRSContext: : Register. Power. Setting. Callback( IN PDEVICE_OBJECT Device. Object, OUT HANDLE Power. Setting. Callback. Handle ) { NTSTATUS Status = STATUS_SUCCESS; Power Setting GUID Status = Po. Register. Power. Setting. Callback( Po. Register. Power. Setting. Callback Device. Object, (LPGUID)(&GUID_GRAPHICS_ENGINE_POWER_PLAY_MODE), (PPOWER_SETTING_CALLBACK)&Power. Setting. Callback, Device. Object->Device. Object. Extension, &Power. Setting. Callback. Handle ); return Status; } De-register When Device is Stopped

Implementation Details Example: Driver callback function NTSTATUS Power. Setting. Callback( Power. Setting. Callback IN CONST LPGUID Setting. Guid, IN PULONG New. Value, IN ULONG Value. Length, IN PVOID Context ) { NTSTATUS Status = STATUS_INVALID_PARAMETER; Power Setting GUID // Check for correct GUID, Data if (Is. Equal. GUID( (LPGUID)(&GUID_GRAPHICS_ENGINE_POWER_PLAY_MODE), Setting. GUID ) && (Value. Length == sizeof(DWORD)) && Change the Device Power (New. Value != NULL) ) { Management Behavior // NOT SHOWN: Any necessary locks // Change graphics engine power mode } return Status; }

Implementation Details Example: Deregister for notifications NTSTATUS Un. Register. Power. Setting. Callback( IN HANDLE Power. Setting. Callback. Handle ) { NTSTATUS Status = STATUS_SUCCESS; Status = Po. Un. Register. Power. Setting. Callback( Po. Un. Register. Power. Setting. Callback &Power. Setting. Callback. Handle ); return Status; }

Implementation Details Power configuration user interface Default power settings Note: Power settings may be system-specific

Implementation Details Power configuration user interface UI extended with custom power settings

Implementation Details User interface summary Windows automatically adds custom power settings to Power Options Advanced Settings UI Multiple settings can be contained in a new subgroup Each setting has an AC and DC value Settings can be discrete or range of values

Implementation Details Power configuration user interface UI extended with additional property sheet

Implementation Details User interface summary Property sheets may be added for more advanced UI May have a superset of functionality E. g. , battery degrade behaviors Property sheets can leverage Power Policy APIs ATI exposes Power. Play functionality OEM does not need to write special UI to add features

Integrating Power. Play With Windows Vista Phil Mummah SW Architect ATI

Call To Action Implement device power management technologies in your hardware designs Take advantage of Windows Vista power management integration opportunities Review Integrating with Windows Vista Power Policy white paper http: //go. microsoft. com/fwlink/? Link. Id=51286

Additional Resources ATI Technologies, Inc. http: //www. ati. com ATI Power. Play. TM white paper http: //www. ati. com/products/pdf/powerplaywp 2. pdf Windows Hardware and Driver Central http: //www. microsoft. com/whdc Power Management, ACPI on WHDC http: //www. microsoft. com/whdc/system/pnppwr/powermgmt/ default. mspx Integrating with Windows Vista Power Policy white paper http: //go. microsoft. com/fwlink/? Link. Id=51286

© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U. S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
