| .. | .. |
|---|
| 17 | 17 | #include <linux/hrtimer.h> |
|---|
| 18 | 18 | #include <linux/miscdevice.h> |
|---|
| 19 | 19 | |
|---|
| 20 | | -#ifndef FPGA_PLATFORM |
|---|
| 21 | | -#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE |
|---|
| 22 | 20 | #include <soc/rockchip/rockchip_opp_select.h> |
|---|
| 23 | | -#endif |
|---|
| 24 | | -#endif |
|---|
| 21 | +#include <soc/rockchip/rockchip_system_monitor.h> |
|---|
| 22 | +#include <soc/rockchip/rockchip_ipa.h> |
|---|
| 25 | 23 | |
|---|
| 26 | 24 | #include "rknpu_job.h" |
|---|
| 27 | 25 | #include "rknpu_fence.h" |
|---|
| .. | .. |
|---|
| 30 | 28 | |
|---|
| 31 | 29 | #define DRIVER_NAME "rknpu" |
|---|
| 32 | 30 | #define DRIVER_DESC "RKNPU driver" |
|---|
| 33 | | -#define DRIVER_DATE "20230825" |
|---|
| 31 | +#define DRIVER_DATE "20231121" |
|---|
| 34 | 32 | #define DRIVER_MAJOR 0 |
|---|
| 35 | 33 | #define DRIVER_MINOR 9 |
|---|
| 36 | | -#define DRIVER_PATCHLEVEL 2 |
|---|
| 34 | +#define DRIVER_PATCHLEVEL 3 |
|---|
| 37 | 35 | |
|---|
| 38 | 36 | #define LOG_TAG "RKNPU" |
|---|
| 39 | 37 | |
|---|
| .. | .. |
|---|
| 76 | 74 | __u64 nbuf_phyaddr; |
|---|
| 77 | 75 | __u64 nbuf_size; |
|---|
| 78 | 76 | __u64 max_submit_number; |
|---|
| 77 | + __u32 core_mask; |
|---|
| 79 | 78 | }; |
|---|
| 80 | 79 | |
|---|
| 81 | 80 | struct rknpu_timer { |
|---|
| 82 | | - __u32 busy_time; |
|---|
| 83 | | - __u32 busy_time_record; |
|---|
| 81 | + ktime_t busy_time; |
|---|
| 82 | + ktime_t total_busy_time; |
|---|
| 84 | 83 | }; |
|---|
| 85 | 84 | |
|---|
| 86 | 85 | struct rknpu_subcore_data { |
|---|
| .. | .. |
|---|
| 130 | 129 | struct thermal_cooling_device *devfreq_cooling; |
|---|
| 131 | 130 | struct devfreq *devfreq; |
|---|
| 132 | 131 | unsigned long ondemand_freq; |
|---|
| 133 | | -#ifndef FPGA_PLATFORM |
|---|
| 134 | | -#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE |
|---|
| 135 | 132 | struct rockchip_opp_info opp_info; |
|---|
| 136 | | -#endif |
|---|
| 137 | | -#endif |
|---|
| 138 | 133 | unsigned long current_freq; |
|---|
| 139 | 134 | unsigned long current_volt; |
|---|
| 140 | 135 | int bypass_irq_handler; |
|---|