diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-01-24 00:59:07 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-13 03:09:04 -0400 |
commit | 8d7bb400638906075c38cb07891993cf95076aa7 (patch) | |
tree | 53f6f6be77f239f3a46da76825eb8c484c31c068 /drivers/gpu/drm/nouveau/nouveau_drv.h | |
parent | b830973b68895813b911fb04626d907744e7d7a2 (diff) |
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 531e435d9fb3..009089e093f3 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 { | |||
485 | u8 tUNK_20, tUNK_21; | 485 | u8 tUNK_20, tUNK_21; |
486 | }; | 486 | }; |
487 | 487 | ||
488 | struct nouveau_pm_profile; | ||
489 | struct nouveau_pm_profile_func { | ||
490 | struct nouveau_pm_level *(*select)(struct nouveau_pm_profile *); | ||
491 | }; | ||
492 | |||
493 | struct nouveau_pm_profile { | ||
494 | const struct nouveau_pm_profile_func *func; | ||
495 | struct list_head head; | ||
496 | char name[8]; | ||
497 | }; | ||
498 | |||
488 | #define NOUVEAU_PM_MAX_LEVEL 8 | 499 | #define NOUVEAU_PM_MAX_LEVEL 8 |
489 | struct nouveau_pm_level { | 500 | struct nouveau_pm_level { |
501 | struct nouveau_pm_profile profile; | ||
490 | struct device_attribute dev_attr; | 502 | struct device_attribute dev_attr; |
491 | char name[32]; | 503 | char name[32]; |
492 | int id; | 504 | int id; |
493 | 505 | ||
506 | struct nouveau_pm_memtiming timing; | ||
494 | u32 memory; | 507 | u32 memory; |
495 | u16 memscript; | 508 | u16 memscript; |
496 | struct nouveau_pm_memtiming timing; | ||
497 | 509 | ||
498 | u32 core; | 510 | u32 core; |
499 | u32 shader; | 511 | u32 shader; |
@@ -542,6 +554,10 @@ struct nouveau_pm_engine { | |||
542 | struct nouveau_pm_threshold_temp threshold_temp; | 554 | struct nouveau_pm_threshold_temp threshold_temp; |
543 | struct nouveau_pm_fan fan; | 555 | struct nouveau_pm_fan fan; |
544 | 556 | ||
557 | struct nouveau_pm_profile *profile_ac; | ||
558 | struct nouveau_pm_profile *profile_dc; | ||
559 | struct list_head profiles; | ||
560 | |||
545 | struct nouveau_pm_level boot; | 561 | struct nouveau_pm_level boot; |
546 | struct nouveau_pm_level *cur; | 562 | struct nouveau_pm_level *cur; |
547 | 563 | ||