使用orin模组在自研板载上不接入相机,拉流出现vi-output CPU占有率100%

系统版本:jp 6.0

解串器:max9296

使用自研板载,不接入相机,开启video0 1,开流后,vi-output占100% ,如果这时候关闭流会系统卡死。

dmesg.log (31.8 KB)

在5.1.1和5.1.2上,也有同样问题,使用

的解决方案是可以解决的,但是在6.0上不生效。

并且使用6.2版本,不添加补丁也没有这个问题

希望提供6.0的解决方案

hello qqqqq1,

is it a must to stay-on JetPack 6.0/L4T 36.3?
we do not back-port the changes, usually.
please moving forward to the latest JP-6 public release version.

是的,必须使用JetPack 6.0

please see-also Topic 344342 to apply the patch for verification.

多次尝试下载这个b9d7c97.diff补丁失败,可以帮我从新上传一下吗?

hello qqqqq1,

it looks okay for me,
let me sharing the patch file as code snippets, please try to apply it for testing.
for instance,

index c68751f..75cd52b 100644
--- a/drivers/media/platform/tegra/camera/vi/vi5_fops.c
+++ b/drivers/media/platform/tegra/camera/vi/vi5_fops.c
@@ -617,11 +617,15 @@
 
 uncorr_err:
 	spin_lock_irqsave(&chan->capture_state_lock, flags);
-	chan->capture_state = CAPTURE_ERROR;
+	if (err == -ETIMEDOUT) {
+		chan->capture_state = CAPTURE_TIMEOUT;
+		buf->vb2_state = VB2_BUF_STATE_QUEUED;
+	} else {
+		chan->capture_state = CAPTURE_ERROR;
+		buf->vb2_state = VB2_BUF_STATE_ERROR;
+	}
 	spin_unlock_irqrestore(&chan->capture_state_lock, flags);
 
-	buf->vb2_state = VB2_BUF_STATE_ERROR;
-
 rel_buf:
 	vi5_release_buffer(chan, buf);
 }
@@ -661,7 +665,10 @@
 		buf = dequeue_dequeue_buffer(chan);
 		if (!buf)
 			break;
-		buf->vb2_state = VB2_BUF_STATE_ERROR;
+		if (chan->capture_state == CAPTURE_TIMEOUT)
+			buf->vb2_state = VB2_BUF_STATE_QUEUED;
+		else
+			buf->vb2_state = VB2_BUF_STATE_ERROR;
 		vi5_capture_dequeue(chan, buf);
 	}