linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Milan P. Stanić" <mps-OV3VlZ6014XR7s880joybQ@public.gmane.org>
To: Enric Balletbo Serra <eballetbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "open list:ARM/Rockchip SoC..."
	<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: Re: PROBLEM: [drm:analogix_dp_bridge_atomic_enable [analogix_dp]] *ERROR* Failed to disable psr -110
Date: Sat, 25 Apr 2020 23:11:39 +0200	[thread overview]
Message-ID: <20200425211139.GA18575@arya.arvanta.net> (raw)
In-Reply-To: <20200417192614.GA8457-2zQUq8s2aCOuucbRd6SqTw@public.gmane.org>

Hi Enric, Doug and all,
On Fri, 2020-04-17 at 21:26, Milan P. Stanić wrote:
> On Tue, 2020-04-14 at 20:22, Milan P. Stanić wrote:
> > Yesterday I managed to build chromeOS kernel version 4.4.174 and boot
> > with it without any serious problem.
> > 
> > Current uptime is over 21 hour and it works well, i.e. without problem
> > related to rockchip-dp/analogix driver, even after suspend-to-ram/resume
> > few times.
> > 
> > I will let it few days to work without shutdown (without poweroff or
> > reboot) to see will it work or will any problem appear.
> > 
> > (beside this analogix issue, looks like also emmc works fine with this
> > kernel, although it doesn't work fine with mainline kernels. but this is
> > not related).
> > 
> > If the machine work for three or more days without problem I will report
> > to you. Maybe someone experienced in video/gpu drivers programming could
> > make diffs and make it to work with mainline kernels.
> 
> I built chromeOS kernel 4.4.174 and after three days it works fine
> regarding this problem with analogix bridge.
> 
> Would be nice if someone with GPU/DRM programming knowledge would look
> at differences between this chromeOS kernel and mainline to find what is
> cause of the problem.
> 
> I will try to build mainline kernels going backward by major version
> (5.4, 5.3, 5.2 and so on) to try to see if one of the previous doesn't
> have this problem. This will take some time because problem appears
> randomly, sometimes few minutes straight after boot but sometimes after
> day or two.

I've built 5.2.1 kernel and tested it for three days of uptime (without
shutdown or reboot) and it worked without locking display but have from
time to time warnings in dmesg:
-----------------
    4.765133] rockchip-dp ff970000.edp: no DP phy configured
 6524.939937] rockchip-dp ff970000.edp: Failed to apply PSR -110
14481.854325] rockchip-dp ff970000.edp: Failed to apply PSR -110
14565.881017] rockchip-dp ff970000.edp: Failed to apply PSR -110
15793.280974] rockchip-dp ff970000.edp: Failed to apply PSR -110
22474.968271] rockchip-dp ff970000.edp: Failed to apply PSR -110
24054.391454] rockchip-dp ff970000.edp: Failed to apply PSR -110
41126.507765] rockchip-dp ff970000.edp: AUX CH cmd reply timeout!
43526.604191] rockchip-dp ff970000.edp: Failed to apply PSR -110
111807.839641] rockchip-dp ff970000.edp: Failed to apply PSR -110
112710.959799] rockchip-dp ff970000.edp: Failed to apply PSR -110
113122.383232] rockchip-dp ff970000.edp: Failed to apply PSR -110
113205.260384] rockchip-dp ff970000.edp: AUX CH cmd reply timeout!
113379.609998] rockchip-dp ff970000.edp: Failed to apply PSR -110
-------------------

So it works though with this a little annoying warnings but it is
stable, no other issues and suspend/resume to ram about 5 to 9 times.

Then I built 5.3.1 kernel and it's current uptime is five days, and it
locked display first day but suspend-to-ram and resume unlocked display
and after that no once I have seen display lock. Also
suspend-to-ram/resume works fine for five days without poweroff/reboot.

But still have annoying warnings in dmesg output similar to above (and I
think it doesn't make sense to paste it again here).

Tomorrow I will build 5.4.1 kernel and test it for few days in hope that
I will find at what kernel version problem started to be serious.

-- 
Kind regards

> -- 
> Regards
> 
> > Thank you help
> > 
> > On Tue, 2020-04-14 at 18:17, Enric Balletbo Serra wrote:
> > > Hi Doug and Milan,
> > > 
> > > Thanks for providing this information.
> > > 
> > > Missatge de Doug Anderson <dianders@chromium.org> del dia dl., 13
> > > d’abr. 2020 a les 17:23:
> > > >
> > > > Hi,
> > > >
> > > > On Fri, Apr 10, 2020 at 12:29 PM Milan P. Stanić <mps@arvanta.net> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Fri, 2020-04-10 at 08:28, Doug Anderson wrote:
> > > > > > Hi,
> > > > > >
> > > > > > On Fri, Apr 10, 2020 at 5:56 AM Enric Balletbo Serra
> > > > > > <eballetbo@gmail.com> wrote:
> > > > > > >
> > > > > > > Hi Milan,
> > > > > > >
> > > > > > > Right, this is an annoying issue but also known, unfortunately, I
> > > > > > > personally didn't have time to look at. but it is in my TODO.
> > > > > >
> > > > > > Random shot in the dark, but any chance somehow your PHY clock and
> > > > > > PCLK for the eDP don't match?  If they don't then (IIRC) you'll get
> > > > > > random failures to access eDP registers.
> > > > > >
> > > > > > Some history in <https://crrev.com/c/433393>.  It looks like the
> > > > > > changes in that patch are upstream but if something else happened to
> > > > > > make your PHY and PCLK mismatch it could cause similar symptoms.
> > > > > >
> > > > > > ...of course it's always possible (probable) that it's something
> > > > > > different, but since that was such a weird and hard-to-track-down
> > > > > > problem I figured I'd at least make sure it wasn't that.
> > > > >
> > > > > Not sure I understood (I'm not graphic hardware programmer) but I
> > > > > changed arch/arm64/boot/dts/rockchip/rk3399.dtsi file around line
> > > > > 1367 (current mainline kernel), this:
> > > > >     assigned-clocks =
> > > > >       <&cru PLL_GPLL>, <&cru PLL_CPLL>,
> > > > >       <&cru PLL_NPLL>,
> > > > >       <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
> > > > >       <&cru PCLK_PERIHP>,
> > > > >       <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
> > > > >       <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
> > > > >       <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>,
> > > > >       <&cru ACLK_VIO>, <&cru ACLK_HDCP>,
> > > > >       <&cru ACLK_GIC_PRE>,
> > > > >       <&cru PCLK_DDR>;
> > > > >     assigned-clock-rates =
> > > > >        <594000000>,  <800000000>,
> > > > >       <1000000000>,
> > > > >        <150000000>,   <75000000>,
> > > > >         <37500000>,
> > > > >        <100000000>,  <100000000>,
> > > > >         <50000000>, <600000000>,
> > > > >        <100000000>,   <50000000>,
> > > > >        <400000000>, <400000000>,
> > > > >        <200000000>,
> > > > >        <200000000>;
> > > > >
> > > > > and changed  <594000000> to  <600000000>
> > > > > build kernel and it boots but display is blank after boot.
> > > >
> > > > I think kevin already overrides those clocks in its dts.  I was more
> > > > thinking of looking at "/sys/kernel/debug/clk/clk_summary" and seeing
> > > > if there was a clock mismatch.
> > > >
> > > 
> > > Although I don't discard that this would be the problem, I think it is
> > > more a racing problem with the tracking status of the crtc active and
> > > self_refresh_active variables during the suspend path and PSR. I.e, if
> > > I apply the following patch which sets a delay of 100ms in the delayed
> > > entry work to entry the PSR state (similar to what we had before the
> > > commit I mentioned), suspend resume works as expected for me.
> > > 
> > > @@ -218,7 +234,7 @@ void drm_self_refresh_helper_alter_state(struct
> > > drm_atomic_state *state)
> > >                 mutex_unlock(&sr_data->avg_mutex);
> > > 
> > >                 mod_delayed_work(system_wq, &sr_data->entry_work,
> > > -                                msecs_to_jiffies(delay));
> > > +                                msecs_to_jiffies(100));
> > >         }
> > >  }
> > > 
> > > Some more info is that I was not able to reproduce the problem by
> > > triggering an 'echo mem > /sys/power/state' The only way I can
> > > reproduce the issue is doing as 'systemctl supend' command, which if I
> > > am not mistaken does a DPMS off before suspending.
> > > 
> > > - Enric
> > > 
> > > > -Doug

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2020-04-25 21:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 20:33 PROBLEM: [drm:analogix_dp_bridge_atomic_enable [analogix_dp]] *ERROR* Failed to disable psr -110 Milan P. Stanić
     [not found] ` <20200329203349.GA15121-2zQUq8s2aCOuucbRd6SqTw@public.gmane.org>
2020-04-10  9:57   ` Milan P. Stanić
     [not found]     ` <20200410095719.GA914-2zQUq8s2aCOuucbRd6SqTw@public.gmane.org>
2020-04-10 12:56       ` Enric Balletbo Serra
     [not found]         ` <CAFqH_53TsmtSFnUoWixsa4v6GvOi0Korv3p8BJfROhtW0Afw-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-10 15:28           ` Doug Anderson
     [not found]             ` <CAD=FV=WWx2KH+qKvGa5yQW7fZHQ_azd69Eza_Gvs18eQPvfHGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-10 19:29               ` Milan P. Stanić
     [not found]                 ` <20200410192926.GA24668-2zQUq8s2aCOuucbRd6SqTw@public.gmane.org>
2020-04-13 15:23                   ` Doug Anderson
     [not found]                     ` <CAD=FV=W-5FiZsj-u7V1Kzdo95RaqhE0FQf=nKt7EwyhT5A_RQw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-14 16:17                       ` Enric Balletbo Serra
     [not found]                         ` <CAFqH_50ftrsCZjazu_-DOcC4pqZf2UJ2N7e3HqWitz16jyUUOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-04-14 18:22                           ` Milan P. Stanić
     [not found]                             ` <20200414182242.GA1769-2zQUq8s2aCOuucbRd6SqTw@public.gmane.org>
2020-04-17 19:26                               ` Milan P. Stanić
     [not found]                                 ` <20200417192614.GA8457-2zQUq8s2aCOuucbRd6SqTw@public.gmane.org>
2020-04-25 21:11                                   ` Milan P. Stanić [this message]
     [not found]                                     ` <20200425211139.GA18575-2zQUq8s2aCOuucbRd6SqTw@public.gmane.org>
2020-04-28 19:38                                       ` Milan P. Stanić

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=20200425211139.GA18575@arya.arvanta.net \
    --to=mps-ov3vlz6014xr7s880joybq@public.gmane.org \
    --cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=eballetbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.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;
as well as URLs for NNTP newsgroup(s).