clear-pkgs-linux-iot-lts2018/0882-media-intel-ipu4-ICI-R...

37 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Yew, Chang Ching" <chang.ching.yew@intel.com>
Date: Thu, 17 Jan 2019 09:30:03 +0800
Subject: [PATCH] media: intel-ipu4: [ICI] Reorder mutex lock of ipu css for
isys close
Cannot take mutex lock within a spinlock
Change-Id: I9f80b32f62ff3fcce3498c00479b6a2da7590feb
Tracked-On: OAM-72077
Tracked-On: PKT-1686
Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
---
drivers/media/pci/intel/ici/libintel-ipu4_ici.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/pci/intel/ici/libintel-ipu4_ici.c b/drivers/media/pci/intel/ici/libintel-ipu4_ici.c
index 6858437..bb226d7 100644
--- a/drivers/media/pci/intel/ici/libintel-ipu4_ici.c
+++ b/drivers/media/pci/intel/ici/libintel-ipu4_ici.c
@@ -56,9 +56,11 @@ int ici_fw_isys_close(struct ici_isys *isys)
* some time as the FW must stop its actions including code fetch
* to SP icache.
*/
+ mutex_lock(&isys->lib_mutex);
spin_lock_irqsave(&isys->power_lock, flags);
- rval = ipu_lib_call(device_close, isys);
+ rval = ipu_lib_call_notrace_unlocked(device_close, isys);
spin_unlock_irqrestore(&isys->power_lock, flags);
+ mutex_unlock(&isys->lib_mutex);
if (rval)
dev_err(dev, "Device close failure: %d\n", rval);
--
https://clearlinux.org