diff options
Diffstat (limited to 'drivers/media/pci/intel/ipu3/ipu3-cio2.c')
-rw-r--r-- | drivers/media/pci/intel/ipu3/ipu3-cio2.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c index 6c4444b31f4b..7d768ec0f824 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c | |||
@@ -1,14 +1,6 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
1 | /* | 2 | /* |
2 | * Copyright (c) 2017 Intel Corporation. | 3 | * Copyright (C) 2017 Intel Corporation |
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License version | ||
6 | * 2 as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | 4 | * |
13 | * Based partially on Intel IPU4 driver written by | 5 | * Based partially on Intel IPU4 driver written by |
14 | * Sakari Ailus <sakari.ailus@linux.intel.com> | 6 | * Sakari Ailus <sakari.ailus@linux.intel.com> |
@@ -526,6 +518,8 @@ static void cio2_hw_exit(struct cio2_device *cio2, struct cio2_queue *q) | |||
526 | unsigned int i, maxloops = 1000; | 518 | unsigned int i, maxloops = 1000; |
527 | 519 | ||
528 | /* Disable CSI receiver and MIPI backend devices */ | 520 | /* Disable CSI receiver and MIPI backend devices */ |
521 | writel(0, q->csi_rx_base + CIO2_REG_IRQCTRL_MASK); | ||
522 | writel(0, q->csi_rx_base + CIO2_REG_IRQCTRL_ENABLE); | ||
529 | writel(0, q->csi_rx_base + CIO2_REG_CSIRX_ENABLE); | 523 | writel(0, q->csi_rx_base + CIO2_REG_CSIRX_ENABLE); |
530 | writel(0, q->csi_rx_base + CIO2_REG_MIPIBE_ENABLE); | 524 | writel(0, q->csi_rx_base + CIO2_REG_MIPIBE_ENABLE); |
531 | 525 | ||
@@ -1035,6 +1029,7 @@ static void cio2_vb2_stop_streaming(struct vb2_queue *vq) | |||
1035 | "failed to stop sensor streaming\n"); | 1029 | "failed to stop sensor streaming\n"); |
1036 | 1030 | ||
1037 | cio2_hw_exit(cio2, q); | 1031 | cio2_hw_exit(cio2, q); |
1032 | synchronize_irq(cio2->pci_dev->irq); | ||
1038 | cio2_vb2_return_all_buffers(q, VB2_BUF_STATE_ERROR); | 1033 | cio2_vb2_return_all_buffers(q, VB2_BUF_STATE_ERROR); |
1039 | media_pipeline_stop(&q->vdev.entity); | 1034 | media_pipeline_stop(&q->vdev.entity); |
1040 | pm_runtime_put(&cio2->pci_dev->dev); | 1035 | pm_runtime_put(&cio2->pci_dev->dev); |
@@ -1976,6 +1971,7 @@ static int __maybe_unused cio2_suspend(struct device *dev) | |||
1976 | 1971 | ||
1977 | /* Stop stream */ | 1972 | /* Stop stream */ |
1978 | cio2_hw_exit(cio2, q); | 1973 | cio2_hw_exit(cio2, q); |
1974 | synchronize_irq(pci_dev->irq); | ||
1979 | 1975 | ||
1980 | pm_runtime_force_suspend(dev); | 1976 | pm_runtime_force_suspend(dev); |
1981 | 1977 | ||