LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
To: Brian Masney <masneyb@onstation.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Sean Paul <sean@poorly.run>, Rob Herring <robh@kernel.org>,
	Jonathan Marek <jonathan@marek.ca>,
	Dave Airlie <airlied@linux.ie>,
	MSM <linux-arm-msm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>,
	Rob Clark <robdclark@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	freedreno <freedreno@lists.freedesktop.org>
Subject: Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support
Date: Wed, 29 May 2019 08:41:31 -0600	[thread overview]
Message-ID: <CAOCk7NoVknZOkFcki9c8hq2vkqLhBSfum05T9Srq8mtJjAaLyQ@mail.gmail.com> (raw)
In-Reply-To: <20190529102822.GA15027@basecamp>

On Wed, May 29, 2019 at 4:28 AM Brian Masney <masneyb@onstation.org> wrote:
>
> On Tue, May 28, 2019 at 08:53:49PM -0600, Jeffrey Hugo wrote:
> > On Tue, May 28, 2019 at 8:46 PM Brian Masney <masneyb@onstation.org> wrote:
> > >
> > > On Tue, May 28, 2019 at 07:42:19PM -0600, Jeffrey Hugo wrote:
> > > > > > Do you know if the nexus 5 has a video or command mode panel?  There
> > > > > > is some glitchyness with vblanks and command mode panels.
> > > > >
> > > > > Its in command mode. I know this because I see two 'pp done time out'
> > > > > messages, even on 4.17. Based on my understanding, the ping pong code is
> > > > > only applicable for command mode panels.
> > > >
> > > > Actually, the ping pong element exists in both modes, but 'pp done
> > > > time out' is a good indicator that it is command mode.
> > > >
> > > > Are you also seeing vblank timeouts?
> > >
> > > Yes, here's a snippet of the first one.
> > >
> > > [    2.556014] WARNING: CPU: 0 PID: 5 at drivers/gpu/drm/drm_atomic_helper.c:1429 drm_atomic_helper_wait_for_vblanks.part.1+0x288/0x290
> > > [    2.556020] [CRTC:49:crtc-0] vblank wait timed out
> > > [    2.556023] Modules linked in:
> > > [    2.556034] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.2.0-rc1-00178-g72c3c1fd5f86-dirty #426
> > > [    2.556038] Hardware name: Generic DT based system
> > > [    2.556056] Workqueue: events deferred_probe_work_func
> > > ...
> > >
> > > > Do you have busybox?
> > > >
> > > > Can you run -
> > > > sudo busybox devmem 0xFD900614
> > > > sudo busybox devmem 0xFD900714
> > > > sudo busybox devmem 0xFD900814
> > > > sudo busybox devmem 0xFD900914
> > > > sudo busybox devmem 0xFD900A14
> > >
> > > # busybox devmem 0xFD900614
> > > 0x00020020
> >
> > Ok, so CTL_0 path, command mode, ping pong 0, with the output going to DSI 1.
> >
> > Next one please:
> >
> > busybox devmem 0xFD912D30
>
> It's 0x00000000 on mainline and 4.17. I used the following script to
> dump the entire mdp5 memory region and attached the dump from 4.17 and
> 5.2rc1.
>

ok, 0 means autorefresh is not on.  Which is fine.  My next guess
would be the vblank code checking the hardware vblank counter, which
doesn't exist.
In video mode, there is a frame counter which increments, which can be
used as the vblank counter.  Unfortunately, that hardware isn't active
in command mode, and there isn't an equivalent.

So, the vblank code is going to read the register, and look for an
update, which will never happen, thus it will timeout.  There is a
backup path which uses timestamps (no hardware), which you can
activate with a quick hack - make max_vblank_count = 0 at the
following line
https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c#L753

  reply	other threads:[~2019-05-29 14:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09  2:03 Brian Masney
2019-05-09  2:03 ` [PATCH v2 1/6] drm: msm: remove resv fields from msm_gem_object struct Brian Masney
2019-05-13 20:32   ` Bjorn Andersson
2019-05-13 22:25     ` Brian Masney
2019-05-09  2:03 ` [PATCH RFC v2 2/6] drm: msm: add dirty framebuffer helper Brian Masney
2019-05-09  2:03 ` [PATCH v2 3/6] ARM: qcom_defconfig: add display-related options Brian Masney
2019-05-09  2:03 ` [PATCH v2 4/6] ARM: dts: msm8974: add display support Brian Masney
2019-05-09  2:03 ` [PATCH v2 5/6] ARM: dts: qcom: msm8974-hammerhead: add support for backlight Brian Masney
2019-05-09  2:03 ` [PATCH v2 6/6] ARM: dts: qcom: msm8974-hammerhead: add support for display Brian Masney
2019-05-09  2:06 ` [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support Brian Masney
2019-05-28 13:46 ` Linus Walleij
2019-05-29  1:17   ` Brian Masney
2019-05-29  1:32     ` [Freedreno] " Jeffrey Hugo
2019-05-29  1:37       ` Brian Masney
2019-05-29  1:42         ` Jeffrey Hugo
2019-05-29  2:46           ` Brian Masney
     [not found]             ` <CAOCk7NpC93ACr4jFm7SBOKSvFJSDhq2byX6BAYPX29BuYEkWnQ@mail.gmail.com>
2019-05-29 10:28               ` Brian Masney
2019-05-29 14:41                 ` Jeffrey Hugo [this message]
2019-05-29 19:30                   ` Brian Masney
2019-05-29 19:58                     ` Jeffrey Hugo
2019-05-29 21:54                       ` Brian Masney
2019-05-29  2:14     ` Rob Clark
2019-05-29  2:24       ` [Freedreno] " Jeffrey Hugo
2019-05-29  6:23     ` Linus Walleij
2019-05-29  9:41       ` Brian Masney

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=CAOCk7NoVknZOkFcki9c8hq2vkqLhBSfum05T9Srq8mtJjAaLyQ@mail.gmail.com \
    --to=jeffrey.l.hugo@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jonathan@marek.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masneyb@onstation.org \
    --cc=robdclark@gmail.com \
    --cc=robh@kernel.org \
    --cc=sean@poorly.run \
    --subject='Re: [Freedreno] [PATCH RFC v2 0/6] ARM: qcom: initial Nexus 5 display support' \
    /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

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).