From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Subject: Re: [PATCH] drm: Improve manual IRQ installation documentation Date: Thu, 20 Jun 2013 12:46:21 +0200 Message-ID: <4413102.6AHlGAblh3@avalon> References: <1371643245-8325-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <13858203.X70ZrUFadi@avalon> <20130620104026.GA28308@manwe> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0843754292==" Return-path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 198B9E63B9 for ; Thu, 20 Jun 2013 03:46:04 -0700 (PDT) In-Reply-To: <20130620104026.GA28308@manwe> 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: Thierry Reding Cc: Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0843754292== Content-Type: multipart/signed; boundary="nextPart1841184.1S1VUzgNfl"; micalg="pgp-sha1"; protocol="application/pgp-signature" --nextPart1841184.1S1VUzgNfl Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi Thierry, On Thursday 20 June 2013 12:40:26 Thierry Reding wrote: > On Thu, Jun 20, 2013 at 12:17:25PM +0200, Laurent Pinchart wrote: > > 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 > > > > > > > > --- > > > > > > > > Documentation/DocBook/drm.tmpl | 14 ++++++++------ > > > > 1 file changed, 8 insertions(+), 6 deletions(-) > > > > > > > > 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 @@ > > > > > > > > > > > > > > > > DRIVER_HAVE_IRQDRIVER_IRQ_SHARED > > > > > > > > > > > > > > > > - 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_SHARED > > > > indicates whether the device & - handler support > > > > shared > > > > 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="drm-irq-registration"/>. + > > > > DRIVER_IRQ_SHARED indicates whether the device & handler + > > > > > > > > support shared IRQs (note that this is required of PCI > > > > drivers).> > > > > > > > > > > > > > > > > > > > > > > > > > > > > @@ -344,7 +345,8 @@ char *date; > > > > > > > > The DRM core tries to facilitate IRQ handler registration > > > > and > > > > unregistration by providing > > > > drm_irq_install and > > > > drm_irq_uninstall functions. Those > > > > functions only > > > > > > > > - support a single interrupt per device. > > > > + support a single interrupt per device, devices that use > > > > more > > > > than one + IRQs need to be handled manually. > > > > > > Perhaps this should mention that if you handle IRQ installation manually > > > you also need to manually set drm->irq_enabled = 1, as otherwise things > > > like DRM_IOCTL_WAIT_VBLANK won't work properly. > > > > That's only needed if DRIVER_HAVE_IRQ is set, otherwise the > > drm_wait_vblank() 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. Indeed. > 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. Or we could force drivers to set drm->irq_enabled, I'm fine with that as well. I can fix the documentation if that would be the preferred solution. > I'll see if I can find the time to come up with a patch. -- Regards, Laurent Pinchart --nextPart1841184.1S1VUzgNfl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQEcBAABAgAGBQJRwt19AAoJEIkPb2GL7hl1B34IAKkaX1ZiUYfLkKI4tl3Xb27s MJFJESsxqEblbhKW4sk56i/mDlChB0fhNrAKC5ML0Hu/DoXYqq4oDcfsBtqiDHKF oA6QHgF+hvdVcZkx5h0f725s7e7Mz85HZNU7CMJ1d0+MbB7vyShQUz0ARlatb3J1 sTCnZkyHkvOaYwNBBEboWDrZXLjwHph1AL2k7Kga0QwSBK419TzS5Wyk0BBO1Gks IChmGAJWvANE73gHelK+TJl+zQtvxp7KNuUMtuKsgcDzqhb7h3NXPdohFDvJd+3l vxBjbCKgNU9v7k57MHtSutocqJ0VIg9UvfcA3kpst9B84sSzxmN1hJwGjnI2vpM= =2cjm -----END PGP SIGNATURE----- --nextPart1841184.1S1VUzgNfl-- --===============0843754292== 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 --===============0843754292==--