clear-pkgs-linux-iot-lts2018/0966-media-intel-ipu4-VIRT-...

36 lines
1.2 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Meng Wei <wei.meng@intel.com>
Date: Mon, 14 Jan 2019 10:29:04 +0800
Subject: [PATCH] media: intel-ipu4: [VIRT] Close dmabuf fd when dmabuf
released.
For the case of virtualization, dmabuf is
created at service OS, therefore FD is only
known and can only be closed at service OS.
Change-Id: Ia1f456eca4817e86f52cac3056dfe4adfd477ae0
Tracked-On: PKT-1691
Signed-off-by: Ong Hock Yu <ong.hock.yu@intel.com>
Signed-off-by: Meng Wei <wei.meng@intel.com>
---
drivers/media/pci/intel/ipu-psys.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/pci/intel/ipu-psys.c b/drivers/media/pci/intel/ipu-psys.c
2020-10-27 02:14:06 +08:00
index 345285caaa99..de69adb470c3 100644
--- a/drivers/media/pci/intel/ipu-psys.c
+++ b/drivers/media/pci/intel/ipu-psys.c
@@ -543,6 +543,9 @@ static int ipu_psys_release(struct inode *inode, struct file *file)
kbuf->dbuf = NULL;
kbuf->db_attach = NULL;
dma_buf_put(dbuf);
+#if defined(CONFIG_VIDEO_INTEL_IPU_ACRN) && defined(CONFIG_VIDEO_INTEL_IPU_VIRTIO_BE)
+ ksys_close(kbuf->fd);
+#endif
} else {
if (kbuf->db_attach)
ipu_psys_put_userpages(
--
https://clearlinux.org