media: imx: csi: Stop upstream before disabling IDMA channel
authorSteve Longerbeam <slongerbeam@gmail.com>
Mon, 21 Jan 2019 23:35:51 +0000 (21:35 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:10:12 +0000 (20:10 +0100)
commit87bfc7b695bd6e9d74e78925b53f19f750e34acd
tree02002cdbeb7c8a1dc424988c1d0ca11391a4afdf
parent54b9412023917d2bd56d21c76d6908f9de4e3091
media: imx: csi: Stop upstream before disabling IDMA channel

commit 4bc1ab41eee9d02ad2483bf8f51a7b72e3504eba upstream.

Move upstream stream off to just after receiving the last EOF completion
and disabling the CSI (and thus before disabling the IDMA channel) in
csi_stop(). For symmetry also move upstream stream on to beginning of
csi_start().

Doing this makes csi_s_stream() more symmetric with prp_s_stream() which
will require the same change to fix a hard lockup.

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Cc: stable@vger.kernel.org # for 4.13 and up
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/imx/imx-media-csi.c