From: Ian Arkver <ian.arkver.dev@gmail.com>
To: Jacopo Mondi <jacopo@jmondi.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
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: Thu, 7 Mar 2019 11:25:35 +0000 [thread overview]
Message-ID: <60d196dc-9795-7360-536e-4df5ca2b5adb@gmail.com> (raw)
In-Reply-To: <20190307103511.wtx2c7jecyx4nmms@uno.localdomain>
Hi Jacopo,
On 07/03/2019 10:35, Jacopo Mondi wrote:
> Hi Laurent,
>
> On Wed, Mar 06, 2019 at 09:15:21PM +0200, Laurent Pinchart wrote:
>> 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 ?
>>
>
> I know, it's weird, the HDMI transmitter is connected to the HDMI
> input of adv748x and should not be bothered by CSI-2 outputs
> enablement/disablement.
>
> BUT, when I developed the initial adv748x AFE->TXA patches I was
> testing HDMI capture using a laptop, and things were smooth.
>
> I recently started using a chrome cast device I found in some drawer
> to test HDMI, as with it I don't need to go through xrandr as I had to
> do when using a laptop for testing, but it seems the two behaves differently.
>
> Failures are of different types: from detecting a non-realisting
> resolution from the HDMI subdevice, and then messing up the pipeline
> configuration, to capture operations apparently completing properly
> but resulting in mangled images.
>
> Do not deactivate the CSI-2 ouputs seems to fix the issue for the
> Chromecast, and still work when capturing from laptop. There might be
> something I am missing about HDMI maybe, but the patch not just fixes
> the issue for me, but it might make sense on its own as disabling the
> TXes might trigger some internal power saving state, or simply mess up
> the HDMI link.
Maybe disabling the device is clearing the EDID RAM and the Chromecast
rereads this, but the laptop doesn't? Just a thought.
Regards,
Ian.
>
> As disabling both TXes usually happens at media link reset time, just
> before enabling one of them (or both), going through a full disable
> makes little sense, even more if it triggers any sort of malfunctioning.
>
> Does this make sense to you?
>
> Thanks
> j
>
>>> 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
next prev parent reply other threads:[~2019-03-07 11:25 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
2019-03-07 10:35 ` Jacopo Mondi
2019-03-07 11:25 ` Ian Arkver [this message]
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=60d196dc-9795-7360-536e-4df5ca2b5adb@gmail.com \
--to=ian.arkver.dev@gmail.com \
--cc=jacopo+renesas@jmondi.org \
--cc=jacopo@jmondi.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@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