diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-01-24 05:59:07 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-13 07:09:04 (GMT) |
commit | 8d7bb400638906075c38cb07891993cf95076aa7 (patch) | |
tree | 53f6f6be77f239f3a46da76825eb8c484c31c068 /drivers/gpu/drm/nouveau/nouveau_drv.h | |
parent | b830973b68895813b911fb04626d907744e7d7a2 (diff) | |
download | linux-8d7bb400638906075c38cb07891993cf95076aa7.tar.xz |
drm/nouveau/pm: rework to allow selecting separate profiles for ac/battery
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 531e435..009089e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -485,15 +485,27 @@ struct nouveau_pm_tbl_entry { u8 tUNK_20, tUNK_21; }; +struct nouveau_pm_profile; +struct nouveau_pm_profile_func { + struct nouveau_pm_level *(*select)(struct nouveau_pm_profile *); +}; + +struct nouveau_pm_profile { + const struct nouveau_pm_profile_func *func; + struct list_head head; + char name[8]; +}; + #define NOUVEAU_PM_MAX_LEVEL 8 struct nouveau_pm_level { + struct nouveau_pm_profile profile; struct device_attribute dev_attr; char name[32]; int id; + struct nouveau_pm_memtiming timing; u32 memory; u16 memscript; - struct nouveau_pm_memtiming timing; u32 core; u32 shader; @@ -542,6 +554,10 @@ struct nouveau_pm_engine { struct nouveau_pm_threshold_temp threshold_temp; struct nouveau_pm_fan fan; + struct nouveau_pm_profile *profile_ac; + struct nouveau_pm_profile *profile_dc; + struct list_head profiles; + struct nouveau_pm_level boot; struct nouveau_pm_level *cur; |