[PATCH] media: imx: revert streamon sequence change

From: Philipp Zabel
Date: Mon Feb 13 2017 - 03:28:27 EST


Without this patch, starting streaming from a TC358743 MIPI CSI-2 source
fails with the following error messages:

imx6-mipi-csi2: clock lane timeout, phy_state = 0x000006f0
ipu1_csi0: pipeline_set_stream failed with -110

The phy state above has the stopstateclk, rxulpsclknot, and
stopstatedata[3:0] bits set: at this point all lanes are in stop state,
no lane is in ultra low power state or active.
This is no suprise, since tc358743 s_stream(sd, 1) has not been called
due to the recently changed ordering. The imx6-mipi-csi2 s_stream does
wait for the clock lane to become active, so csi2_s_stream must happen
after tc358743_s_stream.

Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
drivers/staging/media/imx/imx-media-utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c
index 81eabcf76a66f..495ccefa3cd2a 100644
--- a/drivers/staging/media/imx/imx-media-utils.c
+++ b/drivers/staging/media/imx/imx-media-utils.c
@@ -782,8 +782,8 @@ static const u32 stream_on_seq[] = {
IMX_MEDIA_GRP_ID_IC_PRPENC,
IMX_MEDIA_GRP_ID_IC_PRP,
IMX_MEDIA_GRP_ID_VDIC,
- IMX_MEDIA_GRP_ID_CSI2,
IMX_MEDIA_GRP_ID_SENSOR,
+ IMX_MEDIA_GRP_ID_CSI2,
IMX_MEDIA_GRP_ID_VIDMUX,
IMX_MEDIA_GRP_ID_CSI,
};
@@ -795,8 +795,8 @@ static const u32 stream_off_seq[] = {
IMX_MEDIA_GRP_ID_VDIC,
IMX_MEDIA_GRP_ID_CSI,
IMX_MEDIA_GRP_ID_VIDMUX,
- IMX_MEDIA_GRP_ID_SENSOR,
IMX_MEDIA_GRP_ID_CSI2,
+ IMX_MEDIA_GRP_ID_SENSOR,
};

#define NUM_STREAM_ENTITIES ARRAY_SIZE(stream_on_seq)
--
2.11.0
---------->8----------

regards
Philipp