Joshua-Riek / ubuntu-rockchip

Ubuntu for Rockchip RK35XX Devices
https://joshua-riek.github.io/ubuntu-rockchip-download/
GNU General Public License v3.0
2.48k stars 264 forks source link

Feature Request: Add rknpu version 0.9.8 #1093

Open vincenzodentamaro opened 4 weeks ago

vincenzodentamaro commented 4 weeks ago

Feature Description

As per the title, please add the new RKNPU kernel version 0.9.8 contained here https://github.com/airockchip/rknn-llm/tree/main/rknpu-driver

In the documentation, rockchip says that if the build fails modify the kernel header file kernel/include/linux/mm.h by adding the following code:


static inline void vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags){ 
vma->vm_flags |= flags; 
} 
static inline void vm_flags_clear(struct vm_area_struct *vma, vm_flags_t flags){ 
vma->vm_flags &= ~flags; 
} 

please update the releases with such kernel driver ASAP. If possible compile it as external module to be loaded with modprobe so if they update the driver, we can recompile it and load it with modprobe instead of recompiling the kernel.

Thank you

Joshua-Riek commented 4 weeks ago

I do not have time, can you open a pull request?

vincenzodentamaro commented 4 weeks ago

Yes of course, I will modify the kernel and do a pull request. Thank you for answering

darkice9x commented 3 weeks ago

vm_flags_set and vm_flags_clear have already been added to ./linux-rockchip/include/linux/version_compat_defs.h. When adding rknpu 0.9.8, there are functions that were not implemented, but they are not needed when using rk3588, so just comment them out.

To comment out the specific line in linux-rockchip/drivers/rknpu/rknpu_devfreq.c at line #237 .set_soc_info = rockchip_opp_set_low_length,.

SimplyCorbett commented 2 weeks ago

Did you open the pull request? Thanks!

c0zaut commented 1 week ago

@SimplyCorbett - it was submitted via the kernel repo: https://github.com/Joshua-Riek/linux-rockchip/pull/36