mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Matti.Vaittinen@fi.rohmeurope.com, andriy.shevchenko@intel.com,
	andriy.shevchenko@linux.intel.com, broonie@kernel.org,
	devicetree@vger.kernel.org, hverkuil@xs4all.nl, khalasa@piap.pl,
	krzysztof.kozlowski+dt@linaro.org,
	laurent.pinchart+renesas@ideasonboard.com, lgirdwood@gmail.com,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org, luca.ceresoli@bootlin.com,
	m.tretter@pengutronix.de, marex@denx.de, mchehab@kernel.org,
	mpagano@gentoo.org, peda@axentia.se, robh+dt@kernel.org,
	sakari.ailus@linux.intel.com, satish.nagireddy@getcruise.com,
	wsa@kernel.org
Subject: Re: [PATCH v13 6/8] media: i2c: add DS90UB960 driver
Date: Tue, 16 May 2023 16:02:37 +0300	[thread overview]
Message-ID: <80f05939-1cc8-e435-138d-b2f519c3b407@ideasonboard.com> (raw)
In-Reply-To: <20230516123549.3120-1-lzenz@dh-electronics.com>

Hi,

On 16/05/2023 15:35, Ludwig Zenz wrote:
> On Wed, 26 Apr 2023 14:51:12 +0300, Tomi Valkeinen wrote:
> 
> [...]
> 
>>   +static int ub960_configure_ports_for_streaming(struct ub960_data *priv,
>>   +					       struct v4l2_subdev_state *state)
>>   +{
>>   +	u8 fwd_ctl;
>>   +	struct {
>>   +		u32 num_streams;
>>   +		u8 pixel_dt;
>>   +		u8 meta_dt;
>>   +		u32 meta_lines;
>>   +		u32 tx_port;
>>   +	} rx_data[UB960_MAX_RX_NPORTS] = {};
>>   +	u8 vc_map[UB960_MAX_RX_NPORTS] = {};
>>   +	struct v4l2_subdev_route *route;
>>   +	unsigned int nport;
>>   +	int ret;
>>   +
>>   +	ret = ub960_validate_stream_vcs(priv);
>>   +	if (ret)
>>   +		return ret;
>>   +
>>   +	ub960_get_vc_maps(priv, state, vc_map);
>>   +
>>   +	for_each_active_route(&state->routing, route) {
>>   +		struct ub960_rxport *rxport;
>>   +		struct ub960_txport *txport;
>>   +		struct v4l2_mbus_framefmt *fmt;
>>   +		const struct ub960_format_info *ub960_fmt;
>>   +		unsigned int nport;
>>   +
>>   +		nport = ub960_pad_to_port(priv, route->sink_pad);
>>   +
>>   +		rxport = priv->rxports[nport];
>>   +		if (!rxport)
>>   +			return -EINVAL;
>>   +
>>   +		txport = priv->txports[ub960_pad_to_port(priv, route->source_pad)];
>>   +		if (!txport)
>>   +			return -EINVAL;
>>   +
>>   +		rx_data[nport].tx_port = ub960_pad_to_port(priv, route->source_pad);
>>   +
>>   +		rx_data[nport].num_streams++;
>>   +
>>   +		/* For the rest, we are only interested in parallel busses */
>>   +		if (rxport->rx_mode == RXPORT_MODE_CSI2_SYNC ||
>>   +		    rxport->rx_mode == RXPORT_MODE_CSI2_ASYNC)
>>   +			continue;
>>   +
>>   +		if (rx_data[nport].num_streams > 2)
>>   +			return -EPIPE;
>>   +
>>   +		fmt = v4l2_subdev_state_get_stream_format(state,
>>   +							  route->sink_pad,
>>   +							  route->sink_stream);
>>   +		if (!fmt)
>>   +			return -EPIPE;
>>   +
>>   +		ub960_fmt = ub960_find_format(fmt->code);
>>   +		if (!ub960_fmt)
>>   +			return -EPIPE;
>>   +
>>   +		if (ub960_fmt->meta) {
>>   +			if (fmt->height > 3) {
>>   +				dev_err(&priv->client->dev,
>>   +					"rx%u: unsupported metadata height %u\n",
>>   +					nport, fmt->height);
>>   +				return -EPIPE;
>>   +			}
>>   +
>>   +			rx_data[nport].meta_dt = ub960_fmt->datatype;
>>   +			rx_data[nport].meta_lines = fmt->height;
>>   +		} else {
>>   +			rx_data[nport].pixel_dt = ub960_fmt->datatype;
>>   +		}
>>   +	}
>>   +
>>   +	/* Configure RX ports */
>>   +
>>   +	fwd_ctl = 0;
> 
> Hello, I have only used the first RX port in my setup (ds90ub933 to ds90ub964). The logic for activating/deactivating the Rx ports did not work for me. My suggestion is:

Why doesn't it work? What happens?

  Tomi


  reply	other threads:[~2023-05-16 13:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26 11:51 [PATCH v13 0/8] i2c-atr and FPDLink Tomi Valkeinen
2023-04-26 11:51 ` [PATCH v13 1/8] dt-bindings: i2c: Add I2C Address Translator (ATR) Tomi Valkeinen
2023-04-27 16:41   ` Rob Herring
2023-04-26 11:51 ` [PATCH v13 2/8] i2c: add I2C Address Translator (ATR) support Tomi Valkeinen
2023-04-26 11:51 ` [PATCH v13 3/8] dt-bindings: media: add TI DS90UB913 FPD-Link III Serializer Tomi Valkeinen
2023-04-26 11:51 ` [PATCH v13 4/8] dt-bindings: media: add TI DS90UB953 " Tomi Valkeinen
2023-04-26 11:51 ` [PATCH v13 5/8] dt-bindings: media: add TI DS90UB960 FPD-Link III Deserializer Tomi Valkeinen
2023-04-26 11:51 ` [PATCH v13 6/8] media: i2c: add DS90UB960 driver Tomi Valkeinen
2023-05-16 12:35   ` Ludwig Zenz
2023-05-16 13:02     ` Tomi Valkeinen [this message]
2023-05-16 12:44   ` Sakari Ailus
2023-04-26 11:51 ` [PATCH v13 7/8] media: i2c: add DS90UB913 driver Tomi Valkeinen
2023-04-26 11:51 ` [PATCH v13 8/8] media: i2c: add DS90UB953 driver Tomi Valkeinen
2023-05-16 13:32 [PATCH v13 6/8] media: i2c: add DS90UB960 driver Ludwig Zenz
2023-05-16 13:58 ` Tomi Valkeinen
2023-05-16 19:05 Ludwig Zenz
2023-05-19 12:19 ` Tomi Valkeinen
2023-05-22 11:42 Ludwig Zenz

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=80f05939-1cc8-e435-138d-b2f519c3b407@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=Matti.Vaittinen@fi.rohmeurope.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=khalasa@piap.pl \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=lzenz@dh-electronics.com \
    --cc=m.tretter@pengutronix.de \
    --cc=marex@denx.de \
    --cc=mchehab@kernel.org \
    --cc=mpagano@gentoo.org \
    --cc=peda@axentia.se \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=satish.nagireddy@getcruise.com \
    --cc=wsa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome