From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher James Halse Rogers Subject: Re: [PATCH 2/3] drm: Warn if vblank state has become inconsistent. Date: Thu, 28 Apr 2011 07:47:12 +0000 Message-ID: <1303976832.7048.5.camel@Ed> References: <552A7DA1-1812-442D-82EA-231A0DE00EFC@tuebingen.mpg.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1190704789==" Return-path: Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BD549E814 for ; Thu, 28 Apr 2011 00:47:21 -0700 (PDT) In-Reply-To: <552A7DA1-1812-442D-82EA-231A0DE00EFC@tuebingen.mpg.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Mario Kleiner Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1190704789== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-M1qaR7uhp6i+L9i7dalW" --=-M1qaR7uhp6i+L9i7dalW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2011-04-27 at 17:50 +0200, Mario Kleiner wrote: > On Apr 27, 2011, at 10:58 AM, dri-devel-request@lists.freedesktop.org = =20 > wrote: > > Message: 5 > > Date: Wed, 27 Apr 2011 10:38:14 +0200 > > From: Michel D?nzer > > Subject: Re: [PATCH 2/3] drm: Warn if vblank state has become > > inconsistent. > > To: christopher.halse.rogers@canonical.com > > Cc: dri-devel@lists.freedesktop.org > > Message-ID: <1303893494.5633.129.camel@thor.local> > > Content-Type: text/plain; charset=3D"UTF-8" > > > > On Mit, 2011-04-27 at 16:10 +1000, =20 > > christopher.halse.rogers@canonical.com wrote: > >> From: Christopher James Halse Rogers =20 > >> > >> > >> 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 =20 > >> > >> --- > >> 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, =20 > >> int crtc) > >> e->event.sequence); > >> } > >> > >> + WARN_ON(atomic_read(&dev->vblank_refcount[crtc]) !=3D 0); > >> spin_unlock_irqrestore(&dev->vbl_lock, irqflags); > >> } > >> EXPORT_SYMBOL(drm_vblank_off); > > > > Reviewed-by: Michel D?nzer > > >=20 >=20 > Any pending kms pageflip will also hold a reference on the vblank of =20 > a crtc, so having the refcount non-zero there is not really a sign of = =20 > 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? --=-M1qaR7uhp6i+L9i7dalW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAABCAAGBQJNuRuAAAoJEBUHnPSAqAygoDYIAKXdCZDhqce7tdgGZzJdvJDF nhMPlHVjN1d8xwzaWXTXREBkWiz95WjheVw0kLCx3gU30BcRSQ65iy8dVjtEISPD 1z6jRLrcjyYGJoD5dD+HDxVvrTHiVYEckVHVdPJUtGwWX0ZMBD3hWEll6N4uoczT 98OfKtNDIYzGf7GOXP5EHtxUHZCbS/aehkv0AIS6Wdat+uGrN0acXjPSPuDkLYlm 9G2Qk7Pu5ETQ/0PwQOHS+66cHQb0w8mCFhZgKJ82ba0mnlk5Psikj/1U78WQsWGq 9qApI3GMS7W0qJpjiPgyWpNlBMVLQQp8uFo1OJMR00Kl6BaJvGt/L1Pas+SAPkk= =m5ed -----END PGP SIGNATURE----- --=-M1qaR7uhp6i+L9i7dalW-- --===============1190704789== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1190704789==--