From 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 13 May 2024 10:30:14 +0000
Subject: [PATCH] modify sin led gpio
---
kernel/drivers/video/rockchip/mpp/mpp_vdpp.c | 53 ++++++-----------------------------------------------
1 files changed, 6 insertions(+), 47 deletions(-)
diff --git a/kernel/drivers/video/rockchip/mpp/mpp_vdpp.c b/kernel/drivers/video/rockchip/mpp/mpp_vdpp.c
index 43a7cb0..c0dc382 100644
--- a/kernel/drivers/video/rockchip/mpp/mpp_vdpp.c
+++ b/kernel/drivers/video/rockchip/mpp/mpp_vdpp.c
@@ -18,8 +18,6 @@
#include <linux/uaccess.h>
#include <linux/regmap.h>
#include <linux/proc_fs.h>
-#include <linux/mfd/syscon.h>
-#include <linux/rockchip/cpu.h>
#include <soc/rockchip/pm_domains.h>
#include "mpp_debug.h"
@@ -91,7 +89,6 @@
struct reset_control *rst_s;
/* for zme */
void __iomem *zme_base;
- struct regmap *grf;
};
static struct vdpp_hw_info vdpp_v1_hw_info = {
@@ -312,6 +309,7 @@
struct vdpp_dev *vdpp = to_vdpp_dev(mpp);
struct vdpp_task *task = to_vdpp_task(mpp_task);
struct vdpp_hw_info *hw_info = vdpp->hw_info;
+ u32 timing_en = mpp->srv->timing_en;
mpp_debug_enter();
@@ -342,9 +340,13 @@
/* init current task */
mpp->cur_task = mpp_task;
+
+ mpp_task_run_begin(mpp_task, timing_en, MPP_WORK_TIMEOUT_DELAY);
/* Flush the register before the start the device */
wmb();
mpp_write(mpp, hw_info->start_base, task->reg[reg_en]);
+
+ mpp_task_run_end(mpp_task, timing_en);
mpp_debug_leave();
@@ -481,8 +483,6 @@
{
int ret;
struct vdpp_dev *vdpp = to_vdpp_dev(mpp);
-
- mpp->grf_info = &mpp->srv->grf_infos[MPP_DRIVER_VDPP];
/* Get clock info from dtsi */
ret = mpp_get_clk_info(mpp, &vdpp->aclk_info, "aclk");
@@ -645,7 +645,6 @@
/* ensure hardware is being off status */
mpp_write(mpp, hw_info->start_base, 0);
-
return 0;
}
@@ -704,6 +703,7 @@
match = of_match_node(mpp_vdpp_dt_match, pdev->dev.of_node);
if (match)
mpp->var = (struct mpp_dev_var *)match->data;
+ mpp->core_id = -1;
}
ret = mpp_dev_probe(mpp, pdev);
@@ -772,53 +772,12 @@
dev_err(dev, "wait total running time out\n");
}
-static int vdpp_runtime_suspend(struct device *dev)
-{
- struct mpp_dev *mpp = dev_get_drvdata(dev);
- struct mpp_grf_info *info = mpp->grf_info;
- struct mpp_taskqueue *queue = mpp->queue;
-
- if (cpu_is_rk3528() && info && info->mem_offset) {
- mutex_lock(&queue->ref_lock);
- if (!atomic_dec_if_positive(&queue->runtime_cnt)) {
- regmap_write(info->grf, info->mem_offset,
- info->val_mem_off);
- }
- mutex_unlock(&queue->ref_lock);
- }
-
- return 0;
-}
-
-static int vdpp_runtime_resume(struct device *dev)
-{
- struct mpp_dev *mpp = dev_get_drvdata(dev);
- struct mpp_grf_info *info = mpp->grf_info;
- struct mpp_taskqueue *queue = mpp->queue;
-
- if (cpu_is_rk3528() && info && info->mem_offset) {
- mutex_lock(&queue->ref_lock);
- regmap_write(info->grf, info->mem_offset,
- info->val_mem_on);
- atomic_inc(&queue->runtime_cnt);
- mutex_unlock(&queue->ref_lock);
- }
-
- return 0;
-}
-
-static const struct dev_pm_ops vdpp_pm_ops = {
- .runtime_suspend = vdpp_runtime_suspend,
- .runtime_resume = vdpp_runtime_resume,
-};
-
struct platform_driver rockchip_vdpp_driver = {
.probe = vdpp_probe,
.remove = vdpp_remove,
.shutdown = vdpp_shutdown,
.driver = {
.name = VDPP_DRIVER_NAME,
- .pm = &vdpp_pm_ops,
.of_match_table = of_match_ptr(mpp_vdpp_dt_match),
},
};
--
Gitblit v1.6.2