clear-pkgs-linux-iot-lts2018/1102-media-intel-ipu4-ICI-F...

86 lines
2.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: spoluri <sarat.chandra.poluri@intel.com>
Date: Wed, 8 May 2019 18:09:20 -0700
Subject: [PATCH] media: intel-ipu4: [ICI] Fix to Cleanup subdev and stream
structures for all VCs
Cleanup of subdev and stream structures for all VCs
Change-Id: Ic7372e97fc9ddb0fe26ab680e46222e686f52d65
Tracked-On: PKT-2287
Tracked-On: HSDES-1409367422
Signed-off-by: spoluri <sarat.chandra.poluri@intel.com>
---
drivers/media/pci/intel/ici/ici-isys-csi2.c | 8 ++++--
drivers/media/pci/intel/ici/ici-isys-stream.c | 25 +++++++++----------
2 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/drivers/media/pci/intel/ici/ici-isys-csi2.c b/drivers/media/pci/intel/ici/ici-isys-csi2.c
index e03417b..22cbc4c 100644
--- a/drivers/media/pci/intel/ici/ici-isys-csi2.c
+++ b/drivers/media/pci/intel/ici/ici-isys-csi2.c
@@ -523,8 +523,12 @@ EXPORT_SYMBOL(ici_isys_csi2_init);
void ici_isys_csi2_cleanup(struct ici_isys_csi2 *csi2)
{
- ici_isys_subdev_cleanup(&csi2->asd[0]);
- ici_isys_stream_cleanup(&csi2->as[0]);
+ unsigned int i;
+
+ for (i = 0; i < NR_OF_CSI2_ICI_VC; i++) {
+ ici_isys_subdev_cleanup(&csi2->asd[i]);
+ ici_isys_stream_cleanup(&csi2->as[i]);
+ }
}
EXPORT_SYMBOL(ici_isys_csi2_cleanup);
diff --git a/drivers/media/pci/intel/ici/ici-isys-stream.c b/drivers/media/pci/intel/ici/ici-isys-stream.c
index cc9870c..1241dfa 100644
--- a/drivers/media/pci/intel/ici/ici-isys-stream.c
+++ b/drivers/media/pci/intel/ici/ici-isys-stream.c
@@ -905,21 +905,21 @@ static int ici_isys_stream_on(struct file *file, void *fh)
if (ip->interlaced) {
pr_err("** SKTODO: INTERLACE ENABLED **\n");
- if (ip->short_packet_source ==
- IPU_ISYS_SHORT_PACKET_FROM_RECEIVER) {
- rval = ici_isys_frame_buf_short_packet_setup(
- as, &as->strm_format);
- if (rval)
- goto out_requeue;
+ if (ip->short_packet_source ==
+ IPU_ISYS_SHORT_PACKET_FROM_RECEIVER) {
+ rval = ici_isys_frame_buf_short_packet_setup(
+ as, &as->strm_format);
+ if (rval)
+ goto out_requeue;
} else {
memset(ip->isys->short_packet_trace_buffer, 0,
IPU_ISYS_SHORT_PACKET_TRACE_BUFFER_SIZE);
- dma_sync_single_for_device(&as->isys->adev->dev,
- as->isys->short_packet_trace_buffer_dma_addr,
- IPU_ISYS_SHORT_PACKET_TRACE_BUFFER_SIZE,
- DMA_BIDIRECTIONAL);
- ip->short_packet_trace_index = 0;
- }
+ dma_sync_single_for_device(&as->isys->adev->dev,
+ as->isys->short_packet_trace_buffer_dma_addr,
+ IPU_ISYS_SHORT_PACKET_TRACE_BUFFER_SIZE,
+ DMA_BIDIRECTIONAL);
+ ip->short_packet_trace_index = 0;
+ }
}
rval = ici_isys_set_streaming(as, 1);
@@ -1074,7 +1074,6 @@ static int ici_s_fmt_vid_cap_mplane(
static int ici_poll_for_events(
struct ici_isys_stream *as)
{
-// return is_intel_ipu_hw_fpga();
return 0;
}
--
https://clearlinux.org