diff options
| author | Aaron Tian <atian@nvidia.com> | 2019-09-18 05:13:19 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-10-10 16:41:15 -0400 |
| commit | d6c7740ea2ddd9d5087d938e9ee3b3bc2c9b6d0a (patch) | |
| tree | 0a2e87e2cb0dc8f03acd241bc706c578a11fce25 /include | |
| parent | 384d68067b7e55ba16f52f586355f3e812aa9c6f (diff) | |
video: tegra: host: update T186 VIC actmon driver
Modify T186/T210 VIC actmon driver and wmark_active governor
to address the following issues:
1. To let VIC actmon reports accurate VIC active
cycle counts, set static WEIGHT_COUNT in both
VIC actmon and VIC IP block. It ensures
VIC actmon can capture all activity signal
toggle event from VIC.
The value of WEIGHT_COUNT are equal to:
4 * (max VIC freq / VIC_actmon freq)
= 4 * (1024 / 19.2)
~= 213
2. Since VIC actmon reports active "VIC clock
cycle" instead of "VIC actmon clock cycle",
"relative loading translation" should consider
current VIC clock freq.
E.g.,
- sample_period = 80 us, VIC freq = 115.2 Mhz
- 9216 cycles represents 100% loading
(115.2 * 80)
3. Update upper/lower wmark settings after VIC
clock scaled completed, to ensure wmark settings
are equil to 0 ~ 100% loading of current freq.
- Register 'get_dev_status' instance in
devfreq_dev_profile, to let wmark active
governor can query current device freq.
- Register devfreq transition notifier in
wmark_active governor. It will query current
device freq. and update corresponding wmark
value after VIC freq. changed.
Bug 200501949
Change-Id: Ic159eb93fddc37d55b0c9649a3afcb50ed82cac2
Signed-off-by: Aaron Tian <atian@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2200520
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/nvhost.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index d6170f7dc..68b967888 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h | |||
| @@ -108,6 +108,11 @@ struct nvhost_gating_register { | |||
| 108 | u32 disable; | 108 | u32 disable; |
| 109 | }; | 109 | }; |
| 110 | 110 | ||
| 111 | struct nvhost_actmon_register { | ||
| 112 | u32 addr; | ||
| 113 | u32 val; | ||
| 114 | }; | ||
| 115 | |||
| 111 | struct nvhost_clock { | 116 | struct nvhost_clock { |
| 112 | char *name; | 117 | char *name; |
| 113 | unsigned long default_rate; | 118 | unsigned long default_rate; |
| @@ -244,6 +249,9 @@ struct nvhost_device_data { | |||
| 244 | bool linear_emc; | 249 | bool linear_emc; |
| 245 | /* Offset to actmon registers */ | 250 | /* Offset to actmon registers */ |
| 246 | u32 actmon_regs; | 251 | u32 actmon_regs; |
| 252 | /* WEIGHT_COUNT of actmon */ | ||
| 253 | u32 actmon_weight_count; | ||
| 254 | struct nvhost_actmon_register *actmon_setting_regs; | ||
| 247 | /* Devfreq governor name */ | 255 | /* Devfreq governor name */ |
| 248 | const char *devfreq_governor; | 256 | const char *devfreq_governor; |
| 249 | unsigned long freqs[NVHOST_MODULE_MAX_FREQS]; | 257 | unsigned long freqs[NVHOST_MODULE_MAX_FREQS]; |
