Skip to content

Commit 1dd5927

Browse files
Pratyush YadavHans Verkuil
authored andcommitted
media: cadence: csi2rx: Fix stream data configuration
Firstly, there is no VC_EN bit present in the STREAM_DATA_CFG register. Bit 31 is part of the VL_SELECT field. Remove it completely. Secondly, it makes little sense to enable ith virtual channel for ith stream. Sure, there might be a use-case that demands it. But there might also be a use case that demands all streams to use the 0th virtual channel. Prefer this case over the former because it is less arbitrary and also makes it very clear what the limitations of the current driver is instead of giving a false impression that multiple virtual channels are supported. Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Tested-by: Julien Massot <julien.massot@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Jai Luthra <j-luthra@ti.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
1 parent a64175f commit 1dd5927

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/media/platform/cadence/cdns-csi2rx.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
#define CSI2RX_STREAM_STATUS_RDY BIT(31)
5050

5151
#define CSI2RX_STREAM_DATA_CFG_REG(n) (CSI2RX_STREAM_BASE(n) + 0x008)
52-
#define CSI2RX_STREAM_DATA_CFG_EN_VC_SELECT BIT(31)
5352
#define CSI2RX_STREAM_DATA_CFG_VC_SELECT(n) BIT((n) + 16)
5453

5554
#define CSI2RX_STREAM_CFG_REG(n) (CSI2RX_STREAM_BASE(n) + 0x00c)
@@ -271,8 +270,11 @@ static int csi2rx_start(struct csi2rx_priv *csi2rx)
271270
writel(CSI2RX_STREAM_CFG_FIFO_MODE_LARGE_BUF,
272271
csi2rx->base + CSI2RX_STREAM_CFG_REG(i));
273272

274-
writel(CSI2RX_STREAM_DATA_CFG_EN_VC_SELECT |
275-
CSI2RX_STREAM_DATA_CFG_VC_SELECT(i),
273+
/*
274+
* Enable one virtual channel. When multiple virtual channels
275+
* are supported this will have to be changed.
276+
*/
277+
writel(CSI2RX_STREAM_DATA_CFG_VC_SELECT(0),
276278
csi2rx->base + CSI2RX_STREAM_DATA_CFG_REG(i));
277279

278280
writel(CSI2RX_STREAM_CTRL_START,

0 commit comments

Comments
 (0)