build/patch/kernel/archive/odroidxu4-5.15/0009-ODROID-XU4-media-s5p-mfc-stop-streaming-before-relea.patch

34 lines
1.1 KiB
Diff

From e62d3c12e01f644b2e9874950e9e432d4fe56963 Mon Sep 17 00:00:00 2001
From: OtherCrashOverride <OtherCrashOverride@users.noreply.github.com>
Date: Fri, 19 May 2017 12:59:51 +0000
Subject: [PATCH 09/75] ODROID-XU4: media: s5p-mfc: stop streaming before
releasing queues
If streaming is active when the MFC device is closed, it will generate an IOMMU page-fault.
Change-Id: Ie5c664ecddaebedf282eae1d56e82821b5883ffd
Signed-off-by: memeka <mihailescu2m@gmail.com>
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 37f2113a00ec..8c39528be39e 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -941,6 +941,11 @@ static int s5p_mfc_release(struct file *file)
mfc_debug_enter();
if (dev)
mutex_lock(&dev->mfc_mutex);
+
+ /* stop streaming */
+ vb2_streamoff(&ctx->vq_src, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
+ vb2_streamoff(&ctx->vq_dst, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
+
vb2_queue_release(&ctx->vq_src);
vb2_queue_release(&ctx->vq_dst);
if (dev) {
--
2.25.1