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/media/platform/rockchip/isp/capture_v30.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/kernel/drivers/media/platform/rockchip/isp/capture_v30.c b/kernel/drivers/media/platform/rockchip/isp/capture_v30.c
index 5f6616c..78b06ec 100644
--- a/kernel/drivers/media/platform/rockchip/isp/capture_v30.c
+++ b/kernel/drivers/media/platform/rockchip/isp/capture_v30.c
@@ -977,6 +977,15 @@
struct vb2_buffer *vb2_buf = &buf->vb.vb2_buf;
u64 ns = 0;
+ if (stream->skip_frame) {
+ spin_lock_irqsave(&stream->vbq_lock, lock_flags);
+ list_add_tail(&buf->queue, &stream->buf_queue);
+ spin_unlock_irqrestore(&stream->vbq_lock, lock_flags);
+ if (stream->skip_frame)
+ stream->skip_frame--;
+ goto end;
+ }
+
/* Dequeue a filled buffer */
for (i = 0; i < isp_fmt->mplanes; i++) {
u32 payload_size = stream->out_fmt.plane_fmt[i].sizeimage;
@@ -987,10 +996,10 @@
rkisp_dmarx_get_frame(dev, &i, NULL, &ns, true);
buf->vb.sequence = i;
if (!ns)
- ns = ktime_get_ns();
+ ns = rkisp_time_get_ns(dev);
vb2_buf->timestamp = ns;
- ns = ktime_get_ns();
+ ns = rkisp_time_get_ns(dev);
stream->dbg.interval = ns - stream->dbg.timestamp;
stream->dbg.timestamp = ns;
stream->dbg.id = buf->vb.sequence;
@@ -1097,7 +1106,7 @@
stream->ops->enable_mi(stream);
stream->streaming = true;
-
+ stream->skip_frame = 0;
return 0;
}
--
Gitblit v1.6.2