diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index df21edcbae16..d73d37d5effd 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -150,6 +150,8 @@ struct radeon_clock { | |||
150 | */ | 150 | */ |
151 | int radeon_pm_init(struct radeon_device *rdev); | 151 | int radeon_pm_init(struct radeon_device *rdev); |
152 | void radeon_pm_compute_clocks(struct radeon_device *rdev); | 152 | void radeon_pm_compute_clocks(struct radeon_device *rdev); |
153 | void radeon_combios_get_power_modes(struct radeon_device *rdev); | ||
154 | void radeon_atombios_get_power_modes(struct radeon_device *rdev); | ||
153 | 155 | ||
154 | /* | 156 | /* |
155 | * Fences. | 157 | * Fences. |
@@ -583,6 +585,59 @@ enum radeon_pm_action { | |||
583 | PM_ACTION_DOWNCLOCK, | 585 | PM_ACTION_DOWNCLOCK, |
584 | PM_ACTION_UPCLOCK | 586 | PM_ACTION_UPCLOCK |
585 | }; | 587 | }; |
588 | |||
589 | enum radeon_voltage_type { | ||
590 | VOLTAGE_NONE = 0, | ||
591 | VOLTAGE_GPIO, | ||
592 | VOLTAGE_VDDC, | ||
593 | VOLTAGE_SW | ||
594 | }; | ||
595 | |||
596 | struct radeon_voltage { | ||
597 | enum radeon_voltage_type type; | ||
598 | /* gpio voltage */ | ||
599 | struct radeon_gpio_rec gpio; | ||
600 | u32 delay; /* delay in usec from voltage drop to sclk change */ | ||
601 | bool active_high; /* voltage drop is active when bit is high */ | ||
602 | /* VDDC voltage */ | ||
603 | u8 vddc_id; /* index into vddc voltage table */ | ||
604 | u8 vddci_id; /* index into vddci voltage table */ | ||
605 | bool vddci_enabled; | ||
606 | /* r6xx+ sw */ | ||
607 | u32 voltage; | ||
608 | }; | ||
609 | |||
610 | struct radeon_pm_non_clock_info { | ||
611 | /* pcie lanes */ | ||
612 | int pcie_lanes; | ||
613 | /* standardized non-clock flags */ | ||
614 | u32 flags; | ||
615 | }; | ||
616 | |||
617 | struct radeon_pm_clock_info { | ||
618 | /* memory clock */ | ||
619 | u32 mclk; | ||
620 | /* engine clock */ | ||
621 | u32 sclk; | ||
622 | /* voltage info */ | ||
623 | struct radeon_voltage voltage; | ||
624 | /* standardized clock flags - not sure we'll need these */ | ||
625 | u32 flags; | ||
626 | }; | ||
627 | |||
628 | struct radeon_power_state { | ||
629 | /* XXX: use a define for num clock modes */ | ||
630 | struct radeon_pm_clock_info clock_info[8]; | ||
631 | /* number of valid clock modes in this power state */ | ||
632 | int num_clock_modes; | ||
633 | /* currently selected clock mode */ | ||
634 | struct radeon_pm_clock_info *current_clock_mode; | ||
635 | struct radeon_pm_clock_info *default_clock_mode; | ||
636 | /* non clock info about this state */ | ||
637 | struct radeon_pm_non_clock_info non_clock_info; | ||
638 | bool voltage_drop_active; | ||
639 | }; | ||
640 | |||
586 | struct radeon_pm { | 641 | struct radeon_pm { |
587 | struct mutex mutex; | 642 | struct mutex mutex; |
588 | struct work_struct reclock_work; | 643 | struct work_struct reclock_work; |
@@ -609,6 +664,12 @@ struct radeon_pm { | |||
609 | fixed20_12 core_bandwidth; | 664 | fixed20_12 core_bandwidth; |
610 | fixed20_12 sclk; | 665 | fixed20_12 sclk; |
611 | fixed20_12 needed_bandwidth; | 666 | fixed20_12 needed_bandwidth; |
667 | /* XXX: use a define for num power modes */ | ||
668 | struct radeon_power_state power_state[8]; | ||
669 | /* number of valid power states */ | ||
670 | int num_power_states; | ||
671 | struct radeon_power_state *current_power_state; | ||
672 | struct radeon_power_state *default_power_state; | ||
612 | }; | 673 | }; |
613 | 674 | ||
614 | 675 | ||