All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
Subject: [PATCH v2 1/4] rcar-vin: Do not try to stop stream if not running
Date: Fri, 15 Jan 2021 01:21:45 +0100	[thread overview]
Message-ID: <20210115002148.4079591-2-niklas.soderlund+renesas@ragnatech.se> (raw)
In-Reply-To: <20210115002148.4079591-1-niklas.soderlund+renesas@ragnatech.se>

Do not attempt to stop the streaming if the stream is not running.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/platform/rcar-vin/rcar-dma.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c
index 48280ddb15b9b0ee..f30dafbdf61ca15f 100644
--- a/drivers/media/platform/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/rcar-vin/rcar-dma.c
@@ -1301,6 +1301,11 @@ void rvin_stop_streaming(struct rvin_dev *vin)
 
 	spin_lock_irqsave(&vin->qlock, flags);
 
+	if (vin->state == STOPPED) {
+		spin_unlock_irqrestore(&vin->qlock, flags);
+		return;
+	}
+
 	vin->state = STOPPING;
 
 	/* Wait until only scratch buffer is used, max 3 interrupts. */
-- 
2.30.0


  reply	other threads:[~2021-01-15  0:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15  0:21 [PATCH v2 0/4] rcar-csi2: Update handling of transfer error Niklas Söderlund
2021-01-15  0:21 ` Niklas Söderlund [this message]
2021-01-15 11:14   ` [PATCH v2 1/4] rcar-vin: Do not try to stop stream if not running Jacopo Mondi
2021-01-15  0:21 ` [PATCH v2 2/4] rcar-vin: Route events to correct video device Niklas Söderlund
2021-01-15  0:21 ` [PATCH v2 3/4] rcar-vin: Stop stream when subdevice signal EOS Niklas Söderlund
2021-01-25  9:37   ` Hans Verkuil
2021-01-15  0:21 ` [PATCH v2 4/4] rcar-csi2: Do not try to recover after transfer error Niklas Söderlund
2021-01-15  8:58   ` Sergei Shtylyov
2021-01-15 11:17   ` Jacopo Mondi
2021-01-25  9:44   ` Hans Verkuil
2021-03-10 16:45     ` Niklas Söderlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210115002148.4079591-2-niklas.soderlund+renesas@ragnatech.se \
    --to=niklas.soderlund+renesas@ragnatech.se \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.