[PATCH 2/3] drm: Warn if vblank state has become inconsistent.
Christopher James Halse Rogers
christopher.halse.rogers at canonical.com
Thu Apr 28 00:47:12 PDT 2011
On Wed, 2011-04-27 at 17:50 +0200, Mario Kleiner wrote:
> On Apr 27, 2011, at 10:58 AM, dri-devel-request at lists.freedesktop.org
> wrote:
> > Message: 5
> > Date: Wed, 27 Apr 2011 10:38:14 +0200
> > From: Michel D?nzer <michel at daenzer.net>
> > Subject: Re: [PATCH 2/3] drm: Warn if vblank state has become
> > inconsistent.
> > To: christopher.halse.rogers at canonical.com
> > Cc: dri-devel at lists.freedesktop.org
> > Message-ID: <1303893494.5633.129.camel at thor.local>
> > Content-Type: text/plain; charset="UTF-8"
> >
> > On Mit, 2011-04-27 at 16:10 +1000,
> > christopher.halse.rogers at canonical.com wrote:
> >> From: Christopher James Halse Rogers
> >> <christopher.halse.rogers at canonical.com>
> >>
> >> After emitting all the waiting vblank events no-one should hold
> >> a vblank reference. Emit a warning if this is not the case.
> >>
> >> Signed-off-by: Christopher James Halse Rogers
> >> <christopher.halse.rogers at canonical.com>
> >> ---
> >> drivers/gpu/drm/drm_irq.c | 1 +
> >> 1 files changed, 1 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> >> index a1f12cb..72407fa 100644
> >> --- a/drivers/gpu/drm/drm_irq.c
> >> +++ b/drivers/gpu/drm/drm_irq.c
> >> @@ -960,6 +960,7 @@ void drm_vblank_off(struct drm_device *dev,
> >> int crtc)
> >> e->event.sequence);
> >> }
> >>
> >> + WARN_ON(atomic_read(&dev->vblank_refcount[crtc]) != 0);
> >> spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
> >> }
> >> EXPORT_SYMBOL(drm_vblank_off);
> >
> > Reviewed-by: Michel D?nzer <michel at daenzer.net>
> >
>
>
> Any pending kms pageflip will also hold a reference on the vblank of
> a crtc, so having the refcount non-zero there is not really a sign of
> inconsistency, so i'm not sure if a warning is appropriate there.
But at this point the vblank interrupts have been disabled, or at least
the driver's disable function has been called. Will that not mean that
any pending pageflips will wait indefinitely for a vblank interrupt
that's not going to come - ie: exactly the state we're warning against?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20110428/31165f16/attachment.pgp>
More information about the dri-devel
mailing list