Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7686264 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: atmel-isi: Reset the ISI when starting the stream



The queue setup operation isn't the right place to reset the ISI. Move
the reset call to the start streaming operation.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarJosh Wu <josh.wu@atmel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent c01d568e
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -241,16 +241,6 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
	struct atmel_isi *isi = ici->priv;
	struct atmel_isi *isi = ici->priv;
	unsigned long size;
	unsigned long size;
	int ret;

	/* Reset ISI */
	ret = atmel_isi_wait_status(isi, WAIT_ISI_RESET);
	if (ret < 0) {
		dev_err(icd->parent, "Reset ISI timed out\n");
		return ret;
	}
	/* Disable all interrupts */
	isi_writel(isi, ISI_INTDIS, ~0UL);


	size = icd->sizeimage;
	size = icd->sizeimage;


@@ -390,6 +380,16 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
	struct atmel_isi *isi = ici->priv;
	struct atmel_isi *isi = ici->priv;
	u32 sr = 0;
	u32 sr = 0;
	int ret;

	/* Reset ISI */
	ret = atmel_isi_wait_status(isi, WAIT_ISI_RESET);
	if (ret < 0) {
		dev_err(icd->parent, "Reset ISI timed out\n");
		return ret;
	}
	/* Disable all interrupts */
	isi_writel(isi, ISI_INTDIS, ~0UL);


	spin_lock_irq(&isi->lock);
	spin_lock_irq(&isi->lock);
	/* Clear any pending interrupt */
	/* Clear any pending interrupt */