hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/rknpu/include/rknpu_drv.h
....@@ -17,11 +17,9 @@
1717 #include <linux/hrtimer.h>
1818 #include <linux/miscdevice.h>
1919
20
-#ifndef FPGA_PLATFORM
21
-#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
2220 #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>
2523
2624 #include "rknpu_job.h"
2725 #include "rknpu_fence.h"
....@@ -30,10 +28,10 @@
3028
3129 #define DRIVER_NAME "rknpu"
3230 #define DRIVER_DESC "RKNPU driver"
33
-#define DRIVER_DATE "20230428"
31
+#define DRIVER_DATE "20231121"
3432 #define DRIVER_MAJOR 0
35
-#define DRIVER_MINOR 8
36
-#define DRIVER_PATCHLEVEL 8
33
+#define DRIVER_MINOR 9
34
+#define DRIVER_PATCHLEVEL 3
3735
3836 #define LOG_TAG "RKNPU"
3937
....@@ -75,11 +73,13 @@
7573 int num_resets;
7674 __u64 nbuf_phyaddr;
7775 __u64 nbuf_size;
76
+ __u64 max_submit_number;
77
+ __u32 core_mask;
7878 };
7979
8080 struct rknpu_timer {
81
- __u32 busy_time;
82
- __u32 busy_time_record;
81
+ ktime_t busy_time;
82
+ ktime_t total_busy_time;
8383 };
8484
8585 struct rknpu_subcore_data {
....@@ -101,6 +101,7 @@
101101 void __iomem *base[RKNPU_MAX_CORES];
102102 struct device *dev;
103103 #ifdef CONFIG_ROCKCHIP_RKNPU_DRM_GEM
104
+ struct device *fake_dev;
104105 struct drm_device *drm_dev;
105106 #endif
106107 #ifdef CONFIG_ROCKCHIP_RKNPU_DMA_HEAP
....@@ -128,11 +129,7 @@
128129 struct thermal_cooling_device *devfreq_cooling;
129130 struct devfreq *devfreq;
130131 unsigned long ondemand_freq;
131
-#ifndef FPGA_PLATFORM
132
-#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
133132 struct rockchip_opp_info opp_info;
134
-#endif
135
-#endif
136133 unsigned long current_freq;
137134 unsigned long current_volt;
138135 int bypass_irq_handler;