[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdf4df0a-06d7-2ccb-9e8a-0c0ad55871ec@ti.com>
Date: Wed, 4 Dec 2019 21:13:54 +0200
From: Tomi Valkeinen <tomi.valkeinen@...com>
To: Andrey Smirnov <andrew.smirnov@...il.com>,
<dri-devel@...ts.freedesktop.org>
CC: Andrzej Hajda <a.hajda@...sung.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Andrey Gusakov <andrey.gusakov@...entembedded.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Cory Tusar <cory.tusar@....aero>,
Chris Healy <cphealy@...il.com>,
Lucas Stach <l.stach@...gutronix.de>,
<linux-kernel@...r.kernel.org>, Jyri Sarha <jsarha@...com>
Subject: Re: [PATCH v6 03/15] drm/bridge: tc358767: Simplify polling in
tc_link_training()
On 04/12/2019 20:27, Tomi Valkeinen wrote:
> Hi Andrey,
>
> On 19/06/2019 08:27, Andrey Smirnov wrote:
>
>> @@ -748,22 +748,19 @@ static int tc_set_video_mode(struct tc_data *tc,
>> static int tc_wait_link_training(struct tc_data *tc)
>> {
>> - u32 timeout = 1000;
>> u32 value;
>> int ret;
>> - do {
>> - udelay(1);
>> - tc_read(DP0_LTSTAT, &value);
>> - } while ((!(value & LT_LOOPDONE)) && (--timeout));
>> -
>> - if (timeout == 0) {
>> + ret = tc_poll_timeout(tc, DP0_LTSTAT, LT_LOOPDONE,
>> + LT_LOOPDONE, 1, 1000);
>
> This seems to break DP at least with some monitors for me. I think it's just a timeout problem, as
> increasing the values helps.
>
> Using ktime, I can see that during link training, the first call takes ~2ms, the second ~7ms. I
> think this worked before, as udelay(1) takes much longer than 1 us.
Also the timeout in tc_aux_link_setup takes ~500us for me, and max is 1000us. So it works, but I
think it's a bit tight.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists