Upload
antonia-porter
View
215
Download
5
Embed Size (px)
Citation preview
Case Study: ATI Device Case Study: ATI Device Power Management In Power Management In Windows VistaWindows Vista
Phil MummahPhil MummahSoftware ArchitectSoftware ArchitectATIATI
AgendaAgenda
Device power managementDevice power managementOverviewOverview
ATI PowerPlayATI PowerPlayTMTM technology technology
Integrating with Windows Vista Power ManagerIntegrating with Windows Vista Power ManagerWindows Vista enhancementsWindows Vista enhancements
Implementation detailsImplementation details
DemoDemo
SummarySummary
Additional resourcesAdditional resources
Power ManagementPower ManagementOverviewOverview
Device Run time idle detectionDevice Run time idle detectionTransition an inactive device into a low power, non-working power state Transition an inactive device into a low power, non-working power state (e.g., D2)(e.g., D2)
Wake and transition to D0 on I/O traffic, interruptWake and transition to D0 on I/O traffic, interrupt
Device-specific tradeoff of performance for reduced Device-specific tradeoff of performance for reduced power consumptionpower consumption
In the context of the device’s On state (D0)In the context of the device’s On state (D0)Examples: scale device clock rates and core voltages, clock gating,Examples: scale device clock rates and core voltages, clock gating,vary transmit power or communication speed, etc.vary transmit power or communication speed, etc.
Device performance statesDevice performance statesAnalogous to ACPI processor performance statesAnalogous to ACPI processor performance states
Discrete combinations of power consumption and performance Discrete combinations of power consumption and performance
Application performance tradeoff for reduced powerApplication performance tradeoff for reduced powerReduce unnecessary activity in battery modeReduce unnecessary activity in battery mode
Device Power ManagementDevice Power ManagementOpportunities and goalsOpportunities and goals
Extend mobile PC battery lifeExtend mobile PC battery lifeCustomers want extended battery life and Customers want extended battery life and are willing to pay for itare willing to pay for it
Differentiate your products Differentiate your products Add significant value to your deviceAdd significant value to your device
Drive down system power consumptionDrive down system power consumptionReduce fan noise, system thermal outputReduce fan noise, system thermal output
Equally applicable to mobile and Equally applicable to mobile and desktop systemsdesktop systems
Device Power ManagementDevice Power ManagementOpportunities and goalsOpportunities and goals
Devices, services and applications all help Devices, services and applications all help to reduce system power consumptionto reduce system power consumption
WattsWatts
55
1010
1515
20202525
3030
3535
4040
Max CPUMax CPUMax LCDMax LCD
Max AnimationMax Animation
Min LCDMin LCD
MinMinAnimationAnimation
Min CPUMin CPUMax LCDMax LCD
Max AnimationMax Animation
Min LCDMin LCD
MinMinAnimationAnimation
Device Power ManagementDevice Power ManagementATI PowerPlayATI PowerPlay
Reduces the power consumption of ATI Mobile Reduces the power consumption of ATI Mobile RadeonTM graphics devicesRadeonTM graphics devices
When the device is idleWhen the device is idle
When the system is running on batteryWhen the system is running on battery
Exposes API for OEM enhancementsExposes API for OEM enhancements
Offers users the optimal balance of performance Offers users the optimal balance of performance and power consumptionand power consumption
ATI PowerPlayTM drives continuingATI PowerPlayTM drives continuinginnovation and advancement in graphicsinnovation and advancement in graphicspower managementpower management
Integrated with Windows Vista power managementIntegrated with Windows Vista power management
Device Power ManagementDevice Power ManagementATI PowerPlayATI PowerPlay
PowerPlay capabilitiesPowerPlay capabilitiesGPU core voltage and frequency scalingGPU core voltage and frequency scaling
Memory clock scalingMemory clock scaling
Refresh rate reductionRefresh rate reduction
PCI Express dynamic lane width switchingPCI Express dynamic lane width switching
Thermal throttlingThermal throttling
……and moreand more
Windows Vista Power PolicyWindows Vista Power PolicyBenefits of integrationBenefits of integration
Offers users a seamless power Offers users a seamless power management experiencemanagement experience
Provide unified power management controlsProvide unified power management controls
Allows the entire platform to respond to the Allows the entire platform to respond to the user’s current power policyuser’s current power policy
Devices automatically respond to Devices automatically respond to changing system conditionschanging system conditions
Active power scheme/personalityActive power scheme/personality
AC/DC power source changes AC/DC power source changes
Windows Vista Power PolicyWindows Vista Power PolicyEnhancementsEnhancements
Extensible power setting storeExtensible power setting storeDevices or applications can define and install custom Devices or applications can define and install custom power settingspower settingsWindows power manager stores setting data, friendly Windows power manager stores setting data, friendly names, values, etc.names, values, etc.
All power settings appear in Windows All power settings appear in Windows Power OptionsPower Options
Including custom third-party power settingsIncluding custom third-party power settingsNo need to provide additional configuration UINo need to provide additional configuration UI
Robust command-line tool for Robust command-line tool for system administratorsystem administrator
Makes testing, debugging easierMakes testing, debugging easier
Windows Vista Power PolicyWindows Vista Power PolicyUser experience improvementsUser experience improvements
Simplified power plansSimplified power plansThree default power plansThree default power plans
Power Saver, Automatic, High PerformancePower Saver, Automatic, High Performance
Indicates the overall power management Indicates the overall power management policy to the systempolicy to the system
Each plans has a personality settingEach plans has a personality setting
Users can easily change the active Users can easily change the active power planspower plans
One-click from the desktop with the One-click from the desktop with the battery meterbattery meter
Windows Vista Power PolicyWindows Vista Power PolicySteps to driver integrationSteps to driver integration
Define custom power policy settingsDefine custom power policy settings
Install custom power settingsInstall custom power settings
Prepare the device driver toPrepare the device driver toRegister for power events of interestRegister for power events of interest
Respond appropriately to these events Respond appropriately to these events
Optionally, provide additional power Optionally, provide additional power management UImanagement UI
Implementation DetailsImplementation DetailsDefining a power settingDefining a power setting
A custom power setting definition containsA custom power setting definition containsA GUID uniquely identifying the settingA GUID uniquely identifying the setting
Friendly name, description stringsFriendly name, description strings
One or more setting valuesOne or more setting valuesRange, e.g.,Range, e.g.,
0 – 100%0 – 100%
Value: 10 minutesValue: 10 minutes
Discrete valuesDiscrete valuesE.g., {Enabled, Disabled}; {High, Medium, Low}E.g., {Enabled, Disabled}; {High, Medium, Low}
Implementation DetailsImplementation DetailsDefining a power settingDefining a power setting
Critical step:Critical step: Define appropriate defaults Define appropriate defaultsEach power scheme personality’s defaultsEach power scheme personality’s defaults
Users might not change the power policy for your Users might not change the power policy for your power settingpower setting
System power source (AC/DC)System power source (AC/DC)
Each device can define multiple Each device can define multiple power settingspower settings
Power settings can be placed in subgroupsPower settings can be placed in subgroups
Implementation DetailsImplementation DetailsExample: Defining a power settingExample: Defining a power setting
GUIDGUID{191F65B5-D45C-4a4f-8AAE-1AB8BFD980E6}{191F65B5-D45C-4a4f-8AAE-1AB8BFD980E6}
Friendly NameFriendly Name““ATI Graphics Engine PowerPlay”ATI Graphics Engine PowerPlay”
DescriptionDescription““Configures the GPU Power Management Mode”Configures the GPU Power Management Mode”
Values (discrete)Values (discrete)ATI Max Performance ModeATI Max Performance Mode
ATI Balanced ModeATI Balanced Mode
ATI Max Battery ModeATI Max Battery Mode
SubgroupSubgroupNew subgroup created for all ATI PowerPlay settingsNew subgroup created for all ATI PowerPlay settings
Implementation DetailsImplementation DetailsInstalling a power settingInstalling a power setting
Add the setting and its definition to the power Add the setting and its definition to the power policy storepolicy store
Two methods supportedTwo methods supportedINF-based installationINF-based installation
Ideal for device driversIdeal for device drivers
New INF directives for describing power setting,New INF directives for describing power setting,subgroup, possible valuessubgroup, possible values
Multiple settings can be described in the same INF fileMultiple settings can be described in the same INF file
API-based installationAPI-based installationWin32 APIs in Power Profiles Library (powrprof.dll)Win32 APIs in Power Profiles Library (powrprof.dll)
[DeviceName]AddPowerSetting=AtiPowerPolicy
[AtiPowerPolicy]Subgroup = {2566CF20-D01A-456f-BFE1-C6C6E76D15A6}, "ATI Graphics Main Power Settings", "Set all graphics power settings "
Setting = {191F65B5-D45C-4a4f-8AAE-1AB8BFD980E6},{191F65B5-D45C-4a4f-8AAE-1AB8BFD980E6}, “ATI Graphics Engine PowerPlay 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 = %GUID_MAX_POWER_SAVINGS%, %AC%, 1Default = %GUID_MAX_POWER_SAVINGS%, %DC%, 0Default = %GUID_TYPICAL_POWER_SAVINGS%, %AC%, 2Default = %GUID_TYPICAL_POWER_SAVINGS%, %DC%, 0Default = %GUID_MIN_POWER_SAVINGS%, %AC%, 2Default = %GUID_MIN_POWER_SAVINGS%, %DC%, 1
Range of Values can also be done, ie 0 – 100%
Implementation DetailsImplementation DetailsExample: Installing a power settingExample: Installing a power setting
Setting Friendly Name, Description
Power Setting Defined By GUID
Discrete List of Values
Default Values for EachPower Scheme Personality
Implementation DetailsImplementation DetailsRegister for notificationsRegister for notifications
Register within device or application Register within device or application initialization codeinitialization code
PoRegisterPowerSettingNotification()
Register with custom power setting GUIDRegister with custom power setting GUID
De-register when your device is stoppedDe-register when your device is stopped
Kernel-mode registration function includes Kernel-mode registration function includes context parameter context parameter
Most drivers will pass device extension in contextMost drivers will pass device extension in context
Enables drivers to handle registration for Enables drivers to handle registration for multiple devicesmultiple devices
KRSContext::RegisterPowerSettingCallback( IN PDEVICE_OBJECT DeviceObject, OUT HANDLE PowerSettingCallbackHandle ) { NTSTATUS Status = STATUS_SUCCESS;
Status = PoRegisterPowerSettingCallbackPoRegisterPowerSettingCallback(DeviceObject,
(LPGUID)(&GUID_GRAPHICS_ENGINE_POWER_PLAY_MODE),(PPOWER_SETTING_CALLBACK)&PowerSettingCallback,&PowerSettingCallback,
DeviceObject->DeviceObjectExtension,
&PowerSettingCallbackHandle );
return Status;}
Power Setting GUID
De-register WhenDevice is Stopped
Implementation DetailsImplementation DetailsExample: Register for notificationsExample: Register for notifications
NTSTATUSPowerSettingCallbackPowerSettingCallback( IN CONST LPGUID SettingGuid, IN PULONG NewValue, IN ULONG ValueLength, IN PVOID Context ) { NTSTATUS Status = STATUS_INVALID_PARAMETER;
// Check for correct GUID, Dataif (IsEqualGUID(
(LPGUID)(&GUID_GRAPHICS_ENGINE_POWER_PLAY_MODEGUID_GRAPHICS_ENGINE_POWER_PLAY_MODE),SettingGUID ) &&(ValueLength == sizeof(DWORD)) &&(NewValue != NULL) )
{// NOT SHOWN: Any necessary locks
// Change graphics engine power mode// Change graphics engine power mode }
return Status;}
Power Setting GUID
Change the Device PowerManagement Behavior
Implementation DetailsImplementation DetailsExample: Driver callback functionExample: Driver callback function
NTSTATUSUnRegisterPowerSettingCallback( IN HANDLE PowerSettingCallbackHandle ) { NTSTATUS Status = STATUS_SUCCESS; Status = PoUnRegisterPowerSettingCallbackPoUnRegisterPowerSettingCallback(
&PowerSettingCallbackHandle);
return Status;}
Implementation DetailsImplementation DetailsExample: Deregister for notificationsExample: Deregister for notifications
Note:Power settings
may besystem-specific
Implementation DetailsImplementation DetailsPower configuration user interfacePower configuration user interface
Default powersettings
UI extended with custom
power settings
Implementation DetailsImplementation DetailsPower configuration user interfacePower configuration user interface
Implementation DetailsImplementation DetailsUser interface summaryUser interface summary
Windows automatically Windows automatically adds custom power adds custom power settings to Power Options settings to Power Options Advanced Settings UIAdvanced Settings UI
Multiple settingsMultiple settingscan be containedcan be containedin a new subgroupin a new subgroup
Each setting hasEach setting hasan AC and DC valuean AC and DC value
Settings can beSettings can bediscrete or range discrete or range of valuesof values
UI extended with additionalproperty sheet
Implementation DetailsImplementation DetailsPower configuration user interfacePower configuration user interface
Implementation DetailsImplementation DetailsUser interface summaryUser interface summary
Property sheets mayProperty sheets maybe added for more be added for more advanced UIadvanced UI
May have a supersetMay have a supersetof functionalityof functionality
E.g., battery E.g., battery degrade behaviorsdegrade behaviors
Property sheetsProperty sheetscan leverage Powercan leverage PowerPolicy APIsPolicy APIs
ATI exposes PowerPlay ATI exposes PowerPlay functionality functionality
OEM does notOEM does notneed to write specialneed to write specialUI to add featuresUI to add features
Integrating PowerPlay Integrating PowerPlay With Windows VistaWith Windows Vista
Phil MummahPhil MummahSW ArchitectSW ArchitectATIATI
Call To ActionCall To Action
Implement device power management Implement device power management technologies in your hardware designstechnologies in your hardware designs
Take advantage of Windows Vista power Take advantage of Windows Vista power management integration opportunitiesmanagement integration opportunities
Review Integrating with Windows Vista Review Integrating with Windows Vista Power Policy white paperPower Policy white paper
http://http://go.microsoft.com/fwlink/?LinkIdgo.microsoft.com/fwlink/?LinkId=51286=51286
Additional ResourcesAdditional Resources
ATI Technologies, Inc.ATI Technologies, Inc.http://www.ati.comhttp://www.ati.com
ATI PowerPlayTM white paperATI PowerPlayTM white paperhttp://www.ati.com/products/pdf/powerplaywp2.pdf http://www.ati.com/products/pdf/powerplaywp2.pdf
Windows Hardware and Driver CentralWindows Hardware and Driver Centralhttp://www.microsoft.com/whdchttp://www.microsoft.com/whdc
Power Management, ACPI on WHDCPower Management, ACPI on WHDChttp://www.microsoft.com/whdc/system/pnppwr/powermgmt/http://www.microsoft.com/whdc/system/pnppwr/powermgmt/default.mspxdefault.mspx
Integrating with Windows Vista Power Policy Integrating with Windows Vista Power Policy white paperwhite paper
http://go.microsoft.com/fwlink/?LinkId=51286http://go.microsoft.com/fwlink/?LinkId=51286
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.