Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>
Cc: niklas.soderlund+renesas@ragnatech.se,
	kieran.bingham@ideasonboard.com, linux-media@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] media: adv748x: Don't disable CSI-2 on link_setup
Date: Wed, 6 Mar 2019 21:15:21 +0200	[thread overview]
Message-ID: <20190306191521.GE4791@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190306112659.8310-1-jacopo+renesas@jmondi.org>

Hi Jacopo,

On Wed, Mar 06, 2019 at 12:26:59PM +0100, Jacopo Mondi wrote:
> When both the media links between AFE and HDMI and the two TX CSI-2 outputs
> gets disabled, the routing register ADV748X_IO_10 gets zeroed causing both
> TXA and TXB output to get disabled.
> 
> This causes some HDMI transmitters to stop working after both AFE and
> HDMI links are disabled.

Could you elaborate on why this would be the case ? By HDMI transmitter,
I assume you mean the device connected to the HDMI input of the ADV748x.
Why makes it fail (and how ?) when the TXA and TXB are both disabled ?

> Fix this by preventing writing 0 to
> ADV748X_IO_10 register, which gets only updated when links are enabled
> again.
> 
> Fixes: 9423ca350df7 ("media: adv748x: Implement TX link_setup callback")
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
> The issue presents itself only on some HDMI transmitters, and went unnoticed
> during the development of:
> "[PATCH v3 0/6] media: adv748x: Implement dynamic routing support"
> 
> Patch intended to be applied on top of latest media-master, where the
> "[PATCH v3 0/6] media: adv748x: Implement dynamic routing support"
> series is applied.
> 
> The patch reports a "Fixes" tag, but should actually be merged with the above
> mentioned series.
> 
> ---
>  drivers/media/i2c/adv748x/adv748x-core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
> index f57cd77a32fa..0e5a75eb6d75 100644
> --- a/drivers/media/i2c/adv748x/adv748x-core.c
> +++ b/drivers/media/i2c/adv748x/adv748x-core.c
> @@ -354,6 +354,9 @@ static int adv748x_link_setup(struct media_entity *entity,
> 
>  	tx->src = enable ? rsd : NULL;
> 
> +	if (!enable)
> +		return 0;
> +
>  	if (state->afe.tx) {
>  		/* AFE Requires TXA enabled, even when output to TXB */
>  		io10 |= ADV748X_IO_10_CSI4_EN;

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2019-03-06 19:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 11:26 [PATCH] media: adv748x: Don't disable CSI-2 on link_setup Jacopo Mondi
2019-03-06 19:15 ` Laurent Pinchart [this message]
2019-03-07 10:35   ` Jacopo Mondi
2019-03-07 11:25     ` Ian Arkver
2019-03-08 11:29     ` Laurent Pinchart
2019-03-08 13:12       ` Jacopo Mondi
2019-03-11 14:05         ` Hans Verkuil
2019-03-11 14:32           ` Jacopo Mondi

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=20190306191521.GE4791@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=jacopo+renesas@jmondi.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    /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