Firefly开源社区

打印 上一主题 下一主题

[Linux] NPU时钟频率如何设置?

17

积分

0

威望

0

贡献

技术小白

积分
17

NPU时钟频率如何设置?

发表于 2021-10-26 10:31:58      浏览:2891 | 回复:1        打印      只看该作者   [复制链接] 楼主
目前拿到默认值是600MHz,我想修改成900MHz
firefly@firefly:~$ cat /sys/devices/platform/fde40000.npu/devfreq/fde40000.npu/cur_freq
600000000
回复

使用道具 举报

17

积分

0

威望

0

贡献

技术小白

积分
17
发表于 2021-10-26 14:53:07        只看该作者  沙发
本帖最后由 junc23 于 2021-10-26 14:56 编辑

NPU频率设置(RK3566)
路径:/sys/devices/platform/fde40000.npu/devfreq/fde40000.npu
其他型号的开发板可以/sys/devices/platform/*.npu对应找到


  1. # cat available_frequencies
  2. 200000000 297000000 400000000 600000000 700000000 800000000 900000000
  3. # cat available_governors
  4. venc_ondemand userspace powersave performance simple_ondemand
  5. # cat governor
  6. userspace
  7. # cat userspace/set_freq
  8. undefined
复制代码
  • userspace:用户模式,编辑userspace/set_freq进行配置,只能是available_frequencies中列出的
  • powersave:省电模式,固定工作在其支持的最低运行频率上
  • performance:高效模式,固定工作在其支持的最高运行频率上
  • ondemand:按需模式,有计算任务会立即达到最大频率运行,执行完毕就立即回到最低频率
  • 修改governor为performance达到max_freq
  1. # echo performance > governor
  2. # cat governor
  3. performance
  4. # cat cur_freq
  5. 900000000
复制代码
  • 修改userspace/set_freq自定义cur_freq
  1. # echo userspace > governor
  2. # cat governor
  3. userspace
  4. # echo 800000000 > userspace/set_freq
  5. # cat userspace/set_freq
  6. 800000000
  7. # cat cur_freq
  8. 800000000
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表