From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/rknpu/include/rknpu_drv.h | 42 ++++++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/kernel/drivers/rknpu/include/rknpu_drv.h b/kernel/drivers/rknpu/include/rknpu_drv.h
index f5a6b26..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 "20220829"
+#define DRIVER_DATE "20231121"
#define DRIVER_MAJOR 0
-#define DRIVER_MINOR 8
-#define DRIVER_PATCHLEVEL 2
+#define DRIVER_MINOR 9
+#define DRIVER_PATCHLEVEL 3
#define LOG_TAG "RKNPU"
@@ -54,7 +52,7 @@
#define LOG_DEV_DEBUG(dev, fmt, args...) dev_dbg(dev, LOG_TAG ": " fmt, ##args)
#define LOG_DEV_ERROR(dev, fmt, args...) dev_err(dev, LOG_TAG ": " fmt, ##args)
-struct npu_reset_data {
+struct rknpu_reset_data {
const char *srst_a_name;
const char *srst_h_name;
};
@@ -66,16 +64,22 @@
__u32 pc_data_amount_scale;
__u32 pc_task_number_bits;
__u32 pc_task_number_mask;
+ __u32 pc_task_status_offset;
+ __u32 pc_dma_ctrl;
__u32 bw_enable;
- const struct npu_irqs_data *irqs;
- const struct npu_reset_data *resets;
+ const struct rknpu_irqs_data *irqs;
+ const struct rknpu_reset_data *resets;
int num_irqs;
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 {
@@ -97,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
@@ -124,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;
@@ -147,12 +148,21 @@
ktime_t kt;
phys_addr_t sram_start;
phys_addr_t sram_end;
+ phys_addr_t nbuf_start;
+ phys_addr_t nbuf_end;
uint32_t sram_size;
+ uint32_t nbuf_size;
void __iomem *sram_base_io;
+ void __iomem *nbuf_base_io;
struct rknpu_mm *sram_mm;
unsigned long power_put_delay;
};
+struct rknpu_session {
+ struct rknpu_device *rknpu_dev;
+ struct list_head list;
+};
+
int rknpu_power_get(struct rknpu_device *rknpu_dev);
int rknpu_power_put(struct rknpu_device *rknpu_dev);
--
Gitblit v1.6.2