From: Peter Seiderer <ps.report@gmx.net>
To: Steve Longerbeam <slongerbeam@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [v2,1/2] media: imx: csi: Disable CSI immediately after last EOF
Date: Fri, 18 Jan 2019 18:03:21 +0100 [thread overview]
Message-ID: <20190118180321.2789f7a2@gmx.net> (raw)
Hello Steve,
On Thu, Jan 17, 2019 at 6:15 PM Steve Longerbeam <slongerbeam@gmail.com> wrote:
>
> Disable the CSI immediately after receiving the last EOF before stream
> off (and thus before disabling the IDMA channel).
>
> This fixes a complete system hard lockup on the SabreAuto when streaming
> from the ADV7180, by repeatedly sending a stream off immediately followed
> by stream on:
>
> while true; do v4l2-ctl -d4 --stream-mmap --stream-count=3; done
>
> Eventually this either causes the system lockup or EOF timeouts at all
> subsequent stream on, until a system reset.
>
> The lockup occurs when disabling the IDMA channel at stream off. Disabling
> the CSI before disabling the IDMA channel appears to be a reliable fix for
> the hard lockup.
>
> Fixes: 4a34ec8e470cb ("[media] media: imx: Add CSI subdev driver")
[...]
Similar lockup observed on a custom i.mx6 board, fixed locally by the following
patch/workaround:
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 555aa45e02e3..f04d1695f7a4 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -560,8 +560,8 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
static void csi_idmac_unsetup(struct csi_priv *priv,
enum vb2_buffer_state state)
{
- ipu_idmac_disable_channel(priv->idmac_ch);
ipu_smfc_disable(priv->smfc);
+ ipu_idmac_disable_channel(priv->idmac_ch);
csi_idmac_unsetup_vb2_buf(priv, state);
}
Will test your patch the next days...
Regards,
Peter
[Sorry for missing some of the CC and Message-Id, not fully subscribed to linux-media]
next reply other threads:[~2019-01-18 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 17:03 Peter Seiderer [this message]
2019-01-18 19:15 ` [v2,1/2] media: imx: csi: Disable CSI immediately after last EOF Steve Longerbeam
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=20190118180321.2789f7a2@gmx.net \
--to=ps.report@gmx.net \
--cc=linux-media@vger.kernel.org \
--cc=slongerbeam@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox