From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 20 Feb 2024 01:20:52 +0000
Subject: [PATCH] add new system file

---
 kernel/drivers/rknpu/include/rknpu_drv.h |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/kernel/drivers/rknpu/include/rknpu_drv.h b/kernel/drivers/rknpu/include/rknpu_drv.h
index 13280c1..98fba97 100644
--- a/kernel/drivers/rknpu/include/rknpu_drv.h
+++ b/kernel/drivers/rknpu/include/rknpu_drv.h
@@ -17,11 +17,9 @@
 #include <linux/hrtimer.h>
 #include <linux/miscdevice.h>
 
-#ifndef FPGA_PLATFORM
-#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
 #include <soc/rockchip/rockchip_opp_select.h>
-#endif
-#endif
+#include <soc/rockchip/rockchip_system_monitor.h>
+#include <soc/rockchip/rockchip_ipa.h>
 
 #include "rknpu_job.h"
 #include "rknpu_fence.h"
@@ -30,10 +28,10 @@
 
 #define DRIVER_NAME "rknpu"
 #define DRIVER_DESC "RKNPU driver"
-#define DRIVER_DATE "20230428"
+#define DRIVER_DATE "20231121"
 #define DRIVER_MAJOR 0
-#define DRIVER_MINOR 8
-#define DRIVER_PATCHLEVEL 8
+#define DRIVER_MINOR 9
+#define DRIVER_PATCHLEVEL 3
 
 #define LOG_TAG "RKNPU"
 
@@ -75,11 +73,13 @@
 	int num_resets;
 	__u64 nbuf_phyaddr;
 	__u64 nbuf_size;
+	__u64 max_submit_number;
+	__u32 core_mask;
 };
 
 struct rknpu_timer {
-	__u32 busy_time;
-	__u32 busy_time_record;
+	ktime_t busy_time;
+	ktime_t total_busy_time;
 };
 
 struct rknpu_subcore_data {
@@ -101,6 +101,7 @@
 	void __iomem *base[RKNPU_MAX_CORES];
 	struct device *dev;
 #ifdef CONFIG_ROCKCHIP_RKNPU_DRM_GEM
+	struct device *fake_dev;
 	struct drm_device *drm_dev;
 #endif
 #ifdef CONFIG_ROCKCHIP_RKNPU_DMA_HEAP
@@ -128,11 +129,7 @@
 	struct thermal_cooling_device *devfreq_cooling;
 	struct devfreq *devfreq;
 	unsigned long ondemand_freq;
-#ifndef FPGA_PLATFORM
-#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
 	struct rockchip_opp_info opp_info;
-#endif
-#endif
 	unsigned long current_freq;
 	unsigned long current_volt;
 	int bypass_irq_handler;

--
Gitblit v1.6.2