clear-pkgs-linux-iot-lts2018/1140-Revert-media-ici-Fix-w...

60 lines
1.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Yew, Chang Ching" <chang.ching.yew@intel.com>
Date: Thu, 1 Aug 2019 04:25:50 +0800
Subject: [PATCH] Revert "media: ici: Fix warning when stream_start fails."
This reverts commit 1324b9b54b43c89c849f1fb6782dc40291a5afe1.
With this patch, sometime when exit camera, the driver will not set power off function,
then will not open camera successfully next time.
Tracked-On: OAM-83767
Tracked-On: PKT-2253
Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com>
---
drivers/media/pci/intel/ici/ici-isys-stream.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/pci/intel/ici/ici-isys-stream.c b/drivers/media/pci/intel/ici/ici-isys-stream.c
index b1224facd4a5..8daa33ed2f86 100644
--- a/drivers/media/pci/intel/ici/ici-isys-stream.c
+++ b/drivers/media/pci/intel/ici/ici-isys-stream.c
@@ -899,6 +899,8 @@ static int ici_isys_stream_on(struct file *file, void *fh)
return -ENODEV;
}
+ pipeline_set_power(as, 1);
+
mutex_lock(&as->isys->stream_mutex);
ip->source = ip->asd_source->source;
@@ -945,7 +947,7 @@ static int ici_isys_stream_on(struct file *file, void *fh)
out_requeue:
mutex_unlock(&as->isys->stream_mutex);
ici_isys_frame_buf_stream_cancel(as);
-
+ pipeline_set_power(as, 0);
return rval;
}
@@ -964,7 +966,7 @@ static int ici_isys_stream_off(struct file *file, void *fh)
ici_isys_frame_buf_short_packet_destroy(as);
ici_isys_frame_buf_stream_cancel(as);
-
+ pipeline_set_power(as, 0);
return 0;
}
@@ -1115,7 +1117,6 @@ static int stream_fop_open(struct inode *inode, struct file *file)
return rval;
}
- pipeline_set_power(as, 1);
mutex_lock(&isys->mutex);
ipu_configure_spc(adev->isp,
--
https://clearlinux.org