diff options
author | Peng Liu <pengliu@nvidia.com> | 2018-10-30 16:45:43 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-04-01 18:27:17 -0400 |
commit | 3a11883f7f4399ae8dffbea00c1842e3c2095937 (patch) | |
tree | 82d36197046e73c13432250ec4ebce0da21791d5 /drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h | |
parent | f1be222687a853b0218a5700a213f3d34d8ccc4f (diff) |
gpu: nvgpu: using pmu counters for load estimate
PMU counters #0 and #4 are used to count total cycles and busy cycles.
These counts are used by podgov to estimate GPU load.
PMU idle intr status register is used to monitor overflow. Overflow
rarely occurs because frequency governor reads and resets the counters
at a high cadence. When overflow occurs, 100% work load is reported to
frequency governor.
Bug 1963732
Change-Id: I046480ebde162e6eda24577932b96cfd91b77c69
Signed-off-by: Peng Liu <pengliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1939547
(cherry picked from commit 34df0035194e0203f68f679acdd84e5533a48149)
Reviewed-on: https://git-master.nvidia.com/r/1979495
Reviewed-by: Aaron Tian <atian@nvidia.com>
Tested-by: Aaron Tian <atian@nvidia.com>
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h index fa232644..2ca1f02b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gm20b/hw_pwr_gm20b.h | |||
@@ -716,6 +716,54 @@ static inline u32 pwr_pmu_idle_ctrl_filter_disabled_f(void) | |||
716 | { | 716 | { |
717 | return 0x0U; | 717 | return 0x0U; |
718 | } | 718 | } |
719 | static inline u32 pwr_pmu_idle_threshold_r(u32 i) | ||
720 | { | ||
721 | return 0x0010a8a0U + i*4U; | ||
722 | } | ||
723 | static inline u32 pwr_pmu_idle_threshold_value_f(u32 v) | ||
724 | { | ||
725 | return (v & 0x7fffffffU) << 0U; | ||
726 | } | ||
727 | static inline u32 pwr_pmu_idle_intr_r(void) | ||
728 | { | ||
729 | return 0x0010a9e8U; | ||
730 | } | ||
731 | static inline u32 pwr_pmu_idle_intr_en_f(u32 v) | ||
732 | { | ||
733 | return (v & 0x1U) << 0U; | ||
734 | } | ||
735 | static inline u32 pwr_pmu_idle_intr_en_disabled_v(void) | ||
736 | { | ||
737 | return 0x00000000U; | ||
738 | } | ||
739 | static inline u32 pwr_pmu_idle_intr_en_enabled_v(void) | ||
740 | { | ||
741 | return 0x00000001U; | ||
742 | } | ||
743 | static inline u32 pwr_pmu_idle_intr_status_r(void) | ||
744 | { | ||
745 | return 0x0010a9ecU; | ||
746 | } | ||
747 | static inline u32 pwr_pmu_idle_intr_status_intr_f(u32 v) | ||
748 | { | ||
749 | return (v & 0x1U) << 0U; | ||
750 | } | ||
751 | static inline u32 pwr_pmu_idle_intr_status_intr_m(void) | ||
752 | { | ||
753 | return U32(0x1U) << 0U; | ||
754 | } | ||
755 | static inline u32 pwr_pmu_idle_intr_status_intr_v(u32 r) | ||
756 | { | ||
757 | return (r >> 0U) & 0x1U; | ||
758 | } | ||
759 | static inline u32 pwr_pmu_idle_intr_status_intr_pending_v(void) | ||
760 | { | ||
761 | return 0x00000001U; | ||
762 | } | ||
763 | static inline u32 pwr_pmu_idle_intr_status_intr_clear_v(void) | ||
764 | { | ||
765 | return 0x00000001U; | ||
766 | } | ||
719 | static inline u32 pwr_pmu_idle_mask_supp_r(u32 i) | 767 | static inline u32 pwr_pmu_idle_mask_supp_r(u32 i) |
720 | { | 768 | { |
721 | return 0x0010a9f0U + i*8U; | 769 | return 0x0010a9f0U + i*8U; |