From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm: Improve manual IRQ installation documentation Date: Thu, 20 Jun 2013 12:40:26 +0200 Message-ID: <20130620104026.GA28308@manwe> References: <1371643245-8325-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <20130620101046.GA2596@manwe> <13858203.X70ZrUFadi@avalon> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1846917884==" Return-path: Received: from mail-bk0-f65.google.com (mail-bk0-f65.google.com [209.85.214.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 65135E63C3 for ; Thu, 20 Jun 2013 03:40:30 -0700 (PDT) Received: by mail-bk0-f65.google.com with SMTP id ji1so1097573bkc.4 for ; Thu, 20 Jun 2013 03:40:29 -0700 (PDT) In-Reply-To: <13858203.X70ZrUFadi@avalon> 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: Laurent Pinchart Cc: Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1846917884== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 20, 2013 at 12:17:25PM +0200, Laurent Pinchart wrote: > Hi Thierry, >=20 > On Thursday 20 June 2013 12:10:47 Thierry Reding wrote: > > On Wed, Jun 19, 2013 at 02:00:45PM +0200, Laurent Pinchart wrote: > > > Signed-off-by: Laurent Pinchart > > > > > > --- > > >=20 > > > Documentation/DocBook/drm.tmpl | 14 ++++++++------ > > > 1 file changed, 8 insertions(+), 6 deletions(-) > > >=20 > > > diff --git a/Documentation/DocBook/drm.tmpl > > > b/Documentation/DocBook/drm.tmpl index f9df3b8..738b727 100644 > > > --- a/Documentation/DocBook/drm.tmpl > > > +++ b/Documentation/DocBook/drm.tmpl > > > @@ -186,11 +186,12 @@ > > >=20 > > > > > > =20 > > > DRIVER_HAVE_IRQDRIVER_IRQ_SHARED > > > > > >=20 > > > - DRIVER_HAVE_IRQ indicates whether the driver has an IRQ > > > handler. The - DRM core will automatically register an > > > interrupt handler when the - flag is set. DRIVER_IRQ_SHA= RED > > > indicates whether the device & - handler support sha= red > > > IRQs (note that this is required of PCI - drivers). > > > + DRIVER_HAVE_IRQ indicates whether the driver has an IRQ > > > handler + managed by the DRM Core. The core will support > > > simple IRQ handler + installation when the flag is set. = The > > > installation process is + described in > > linkend=3D"drm-irq-registration"/>. + =20 > > > DRIVER_IRQ_SHARED indicates whether the device & handler + = =20 > > > support shared IRQs (note that this is required of PCI drive= rs).>=20 > > > > > > =20 > > > > > > > > >=20 > > > @@ -344,7 +345,8 @@ char *date; > > >=20 > > > The DRM core tries to facilitate IRQ handler registration = and > > > unregistration by providing > > > drm_irq_install and > > > drm_irq_uninstall functions. Those > > > functions only > > >=20 > > > - support a single interrupt per device. > > > + support a single interrupt per device, devices that use mo= re > > > than one + IRQs need to be handled manually. > >=20 > > Perhaps this should mention that if you handle IRQ installation manually > > you also need to manually set drm->irq_enabled =3D 1, as otherwise thin= gs > > like DRM_IOCTL_WAIT_VBLANK won't work properly. >=20 > That's only needed if DRIVER_HAVE_IRQ is set, otherwise the drm_wait_vbla= nk()=20 > function skips the irq_enabled check. Not quite. There's another check for dev->irq_enabled in the DRM_WAIT_ON() so it'll never actually block. Arguably this could be solved by making the DRM_WAIT_ON() condition drop the !dev->irq_enabled in case DRIVER_HAVE_IRQ isn't set. I'll see if I can find the time to come up with a patch. Thierry --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQIcBAEBAgAGBQJRwtwaAAoJEN0jrNd/PrOhgVQP/RI8x8hOnv4C1lv2cIA1ymJK tLn5lSk7ykiRXkG73tYnOUAJ2q8zZono42OZa41hayUV4LGPkH9hArMvAko7fRan C9yPuk8HxJDyI0EFGAof34aPRDHEDhXkpB80bjvMbcfFFY3lT2UlJLi4xQxCPSyg mv7bsEtUGyYbK6Kh2rV2Lz0iX69YK9lyp1TV/ivvnGlSOwahn7t5ha01io6o2f59 dFlyMJSY+PnENfcIyWtyyOvYEFvsRLTVhhVil1milIpDMmYQsccR9FmDUkSbSFIM Dtgi7RC/+r0Xr6GE8Dt3f9HnmKLJ/WJ3Zt5HKSeXDtXz2fgWeqCDu/KLhgYneAr4 5nbBSB5QYftROlWu2daQh4oSI3r9ckV7BRbe5tE2HbFg56C9G2tr7DL+cn6jF6Xg C/OUOy7wG5imlfQlxaih3ilVtpbPcnQT+BMOblBR0sns7ROZQsBg3Opv9iVHUaNh FNJNhnbg305hyfOkagGmG2M8C5FyqsQyOh2EMojzb2Mpt0bkbHRYq37Awz9yJesB HB8AsmLj6UdpQyyizVMW7Xswr94smZ02a0Bf2z4Gtrebq29Nw/BzmTXXA0rpvCA/ 7uxPcUWIvBjWeEk1u2M3u8f+kYk8qPB5c7G3Srr76kOOFVq16l0tLkfR/0x/PAF3 JlwOZ4+fTNKa5GDC32Wp =3EJy -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn-- --===============1846917884== 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 --===============1846917884==--