MEMEKA: 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.

Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
This commit is contained in:
Marian Mihailescu
2022-06-24 17:38:45 +00:00
committed by Mauro (mdrjr) Ribeiro
parent d4b16fca46
commit b786242eb0

View File

@@ -958,6 +958,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) {