diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-04-24 14:50:23 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 04:21:14 -0400 |
commit | a424816fb37f894a37585cf86dfdd6b8b1dc681f (patch) | |
tree | 7129cac19de9c9f5e008669f832ad2e09a3932d1 /drivers/gpu/drm/radeon/radeon.h | |
parent | 49e02b7306cb7e01965fe5f41ba0f80085142f6e (diff) |
drm/radeon/kms/pm: rework power management
Add two new sysfs attributes:
- dynpm
- power_state
Echoing 0/1 to dynpm disables/enables dynamic power management.
The driver scales the sclk dynamically based on the number of
queued fences. dynpm only scales sclk dynamically in single head
mode.
Echoing x.y to power_state selects a static power state (x) and clock
mode (y). This allows you to statically select a power state and clock
mode. Selecting a static clock mode will disable dynpm.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 16f0ea78ea9d..cdcf5eaf6714 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -814,7 +814,7 @@ struct radeon_asic { | |||
814 | void (*ioctl_wait_idle)(struct radeon_device *rdev, struct radeon_bo *bo); | 814 | void (*ioctl_wait_idle)(struct radeon_device *rdev, struct radeon_bo *bo); |
815 | bool (*gui_idle)(struct radeon_device *rdev); | 815 | bool (*gui_idle)(struct radeon_device *rdev); |
816 | void (*get_power_state)(struct radeon_device *rdev, enum radeon_pm_action action); | 816 | void (*get_power_state)(struct radeon_device *rdev, enum radeon_pm_action action); |
817 | void (*set_power_state)(struct radeon_device *rdev); | 817 | void (*set_power_state)(struct radeon_device *rdev, bool static_switch); |
818 | void (*pm_misc)(struct radeon_device *rdev); | 818 | void (*pm_misc)(struct radeon_device *rdev); |
819 | void (*pm_prepare)(struct radeon_device *rdev); | 819 | void (*pm_prepare)(struct radeon_device *rdev); |
820 | void (*pm_finish)(struct radeon_device *rdev); | 820 | void (*pm_finish)(struct radeon_device *rdev); |
@@ -1226,7 +1226,10 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v) | |||
1226 | #define radeon_hpd_set_polarity(rdev, hpd) (rdev)->asic->hpd_set_polarity((rdev), (hpd)) | 1226 | #define radeon_hpd_set_polarity(rdev, hpd) (rdev)->asic->hpd_set_polarity((rdev), (hpd)) |
1227 | #define radeon_gui_idle(rdev) (rdev)->asic->gui_idle((rdev)) | 1227 | #define radeon_gui_idle(rdev) (rdev)->asic->gui_idle((rdev)) |
1228 | #define radeon_get_power_state(rdev, a) (rdev)->asic->get_power_state((rdev), (a)) | 1228 | #define radeon_get_power_state(rdev, a) (rdev)->asic->get_power_state((rdev), (a)) |
1229 | #define radeon_set_power_state(rdev) (rdev)->asic->set_power_state((rdev)) | 1229 | #define radeon_set_power_state(rdev, s) (rdev)->asic->set_power_state((rdev), (s)) |
1230 | #define radeon_pm_misc(rdev) (rdev)->asic->pm_misc((rdev)) | ||
1231 | #define radeon_pm_prepare(rdev) (rdev)->asic->pm_prepare((rdev)) | ||
1232 | #define radeon_pm_finish(rdev) (rdev)->asic->pm_finish((rdev)) | ||
1230 | 1233 | ||
1231 | /* Common functions */ | 1234 | /* Common functions */ |
1232 | /* AGP */ | 1235 | /* AGP */ |