[PATCH 2/7] drm/vc4: Fix vblank handling
boris.brezillon at free-electrons.com
Fri Jun 16 00:47:58 PDT 2017
On Thu, 15 Jun 2017 16:30:58 -0700
Eric Anholt <eric at anholt.net> wrote:
> Boris Brezillon <boris.brezillon at free-electrons.com> writes:
> > There are two problems related to VBLANK handling in the current CRTC
> > driver:
> > * VBLANK events are missed when the CRTC is being disabled because the
> > driver does not wait till the end of the frame before stopping the
> > HVS and PV blocks. In this case, we should explicitly issue a VBLANK
> > event if there's one waiting
> > * when we are enabling a CRTC, drm_crtc_vblank_get() is called before
> > drm_crtc_vblank_on(), which is not supposed to happen (hence the
> > WARN_ON() in the code). To solve the problem, we delay the 'update
> > display list' operation after the CRTC is actually enabled.
> Does drm_crtc_vblank_get() actually fail when drm_crtc_vblank_on()
> hasn't been called? The code is a bit twisty, but it looked like we
> would track the get refcount and then turn on the interrupt once
> drm_crtc_vblank_on() was called.
I thought I had faced the WARN_ON() backtrace while developing the TXP
block, but I can't reproduce it (even after reverting these changes),
so it was probably caused by something else.
> The first change of the two seems straightforward and good, though (and
> possible to separate, right?).
I'll prepare a new patch containing only the first change.
More information about the linux-rpi-kernel