.. | .. |
---|
68 | 68 | int temp_hysteresis; |
---|
69 | 69 | unsigned int delay; |
---|
70 | 70 | bool is_temp_offline; |
---|
| 71 | + bool boosted; |
---|
71 | 72 | }; |
---|
72 | 73 | |
---|
73 | 74 | static unsigned long system_status; |
---|
.. | .. |
---|
288 | 289 | { |
---|
289 | 290 | struct video_info *video_info; |
---|
290 | 291 | unsigned int max_res = 0, max_stream_bitrate = 0, res = 0; |
---|
| 292 | + unsigned int max_video_framerate = 0; |
---|
291 | 293 | |
---|
292 | 294 | mutex_lock(&video_info_mutex); |
---|
293 | 295 | if (list_empty(&video_info_list)) { |
---|
.. | .. |
---|
302 | 304 | max_res = res; |
---|
303 | 305 | if (video_info->streamBitrate > max_stream_bitrate) |
---|
304 | 306 | max_stream_bitrate = video_info->streamBitrate; |
---|
| 307 | + if (video_info->videoFramerate > max_video_framerate) |
---|
| 308 | + max_video_framerate = video_info->videoFramerate; |
---|
305 | 309 | } |
---|
306 | 310 | mutex_unlock(&video_info_mutex); |
---|
307 | 311 | |
---|
.. | .. |
---|
310 | 314 | } else { |
---|
311 | 315 | if (max_stream_bitrate == 10) |
---|
312 | 316 | rockchip_set_system_status(SYS_STATUS_VIDEO_4K_10B); |
---|
313 | | - else |
---|
314 | | - rockchip_set_system_status(SYS_STATUS_VIDEO_4K); |
---|
| 317 | + if (max_video_framerate == 60) |
---|
| 318 | + rockchip_set_system_status(SYS_STATUS_VIDEO_4K_60P); |
---|
| 319 | + rockchip_set_system_status(SYS_STATUS_VIDEO_4K); |
---|
315 | 320 | } |
---|
316 | 321 | } |
---|
317 | 322 | |
---|
.. | .. |
---|
737 | 742 | } |
---|
738 | 743 | EXPORT_SYMBOL(rockchip_monitor_cpu_high_temp_adjust); |
---|
739 | 744 | |
---|
| 745 | +void rockchip_monitor_set_boosted(void) |
---|
| 746 | +{ |
---|
| 747 | + if (system_monitor) |
---|
| 748 | + system_monitor->boosted = true; |
---|
| 749 | +} |
---|
| 750 | +EXPORT_SYMBOL(rockchip_monitor_set_boosted); |
---|
| 751 | + |
---|
| 752 | +void rockchip_monitor_clear_boosted(void) |
---|
| 753 | +{ |
---|
| 754 | + if (system_monitor) |
---|
| 755 | + system_monitor->boosted = false; |
---|
| 756 | +} |
---|
| 757 | +EXPORT_SYMBOL(rockchip_monitor_clear_boosted); |
---|
| 758 | + |
---|
740 | 759 | static int rockchip_monitor_update_devfreq(struct devfreq *df) |
---|
741 | 760 | { |
---|
742 | 761 | int ret = 0; |
---|
.. | .. |
---|
764 | 783 | if (info->devp && info->devp->data) { |
---|
765 | 784 | df = (struct devfreq *)info->devp->data; |
---|
766 | 785 | rockchip_monitor_update_devfreq(df); |
---|
| 786 | + } else if (info->devp && info->devp->low_temp_adjust_volt) { |
---|
| 787 | + info->devp->low_temp_adjust_volt(info); |
---|
767 | 788 | } |
---|
768 | 789 | |
---|
769 | 790 | return 0; |
---|
.. | .. |
---|
1120 | 1141 | |
---|
1121 | 1142 | monitor_set_freq_table(dev, info); |
---|
1122 | 1143 | |
---|
1123 | | - if (info->devp->type == MONITOR_TPYE_DEV) { |
---|
| 1144 | + if (info->devp->type == MONITOR_TPYE_DEV && info->devp->data) { |
---|
1124 | 1145 | info->devfreq_nb.notifier_call = |
---|
1125 | 1146 | system_monitor_devfreq_notifier_call; |
---|
1126 | 1147 | devfreq = (struct devfreq *)info->devp->data; |
---|
.. | .. |
---|
1154 | 1175 | list_del(&info->node); |
---|
1155 | 1176 | up_write(&mdev_list_sem); |
---|
1156 | 1177 | |
---|
1157 | | - devfreq = (struct devfreq *)info->devp->data; |
---|
1158 | | - if (info->devp->type == MONITOR_TPYE_DEV) |
---|
| 1178 | + if (info->devp->type == MONITOR_TPYE_DEV && info->devp->data) { |
---|
| 1179 | + devfreq = (struct devfreq *)info->devp->data; |
---|
1159 | 1180 | devm_devfreq_unregister_notifier(info->dev, devfreq, |
---|
1160 | 1181 | &info->devfreq_nb, |
---|
1161 | 1182 | DEVFREQ_TRANSITION_NOTIFIER); |
---|
| 1183 | + } |
---|
1162 | 1184 | |
---|
1163 | 1185 | kfree(info->low_temp_adjust_table); |
---|
1164 | 1186 | kfree(info->opp_table); |
---|
.. | .. |
---|
1413 | 1435 | if (limit_freq > info->wide_temp_limit / 1000) |
---|
1414 | 1436 | limit_freq = info->wide_temp_limit / 1000; |
---|
1415 | 1437 | } |
---|
1416 | | - if (info->status_max_limit && |
---|
| 1438 | + if (!system_monitor->boosted && |
---|
| 1439 | + info->status_max_limit && |
---|
1417 | 1440 | limit_freq > info->status_max_limit) |
---|
1418 | 1441 | limit_freq = info->status_max_limit; |
---|
1419 | 1442 | |
---|