From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 29/50] drm/irq: simplify irq checks in drm_wait_vblank Date: Thu, 12 Dec 2013 12:29:43 +0100 Message-ID: <20131212112941.GD11524@ulmo.nvidia.com> References: <1386758111-3446-1-git-send-email-daniel.vetter@ffwll.ch> <1386758111-3446-30-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0795095045==" Return-path: Received: from mail-bk0-f46.google.com (mail-bk0-f46.google.com [209.85.214.46]) by gabe.freedesktop.org (Postfix) with ESMTP id DD27FFAC76 for ; Thu, 12 Dec 2013 03:30:58 -0800 (PST) Received: by mail-bk0-f46.google.com with SMTP id u15so811511bkz.5 for ; Thu, 12 Dec 2013 03:30:58 -0800 (PST) In-Reply-To: <1386758111-3446-30-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Daniel Vetter Cc: DRI Development List-Id: dri-devel@lists.freedesktop.org --===============0795095045== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XvKFcGCOAo53UbWW" Content-Disposition: inline --XvKFcGCOAo53UbWW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 11, 2013 at 11:34:50AM +0100, Daniel Vetter wrote: > Checking for both an irq number _and_ whether it's enabled is > redundant. Also this will breakd drivers which do their own irq > management and just set dev->irq_enabled once the irq stuff is all set > up. I don't think it'll break such drivers because they shouldn't have DRIVER_HAVE_IRQ set in the first place. > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_irq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > index c0c6bdedefef..85d88cadc543 100644 > --- a/drivers/gpu/drm/drm_irq.c > +++ b/drivers/gpu/drm/drm_irq.c > @@ -1186,7 +1186,7 @@ int drm_wait_vblank(struct drm_device *dev, void *d= ata, > unsigned int flags, seq, crtc, high_crtc; > =20 > if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) > - if ((!drm_dev_to_irq(dev)) || (!dev->irq_enabled)) > + if (!dev->irq_enabled) In fact, unbreaking drivers was one of the reasons I added this check a few months back (see commit 03f6509df921 'drm: Allow vblank support without DRIVER_HAVE_IRQ'). At the time I could've probably removed the call to drm_dev_to_irq() as well. I'm now thinking that perhaps we could remove the DRIVER_HAVE_IRQ check altogether now, given how I've had to explicitly make the Tegra driver set dev->irq_enabled since there are other places that require it to be set (amongst other things the conditional wait further below in the drm_wait_vblank() function). See commit 603f0cc9482e 'drm/tegra: Explicitly set irq_enabled'. Thierry --XvKFcGCOAo53UbWW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSqZ4lAAoJEN0jrNd/PrOhq4QP+wWawQfPsV+Pfp/t7hwpyaEx ZcvFlrh2mFJrhh72HYa/6acEzpDxnF5pR5nyMtYbfoMF2BOCjISQICW0WJCGh1fh 9zys+9qFALw6UmzAjtvrrqiUJNSCZW8l4oXEQehioqVergx3NAySo0kF07Flqkzg Wu/G/pZBfn7xrgOTAusYt0GgLG52Q46l1uyysBrTbAXFWP4732pPIJgwF2NkvE44 +Y/sCtORJxOhLdxP8gfs5XvVrvH5Ea+7hraALIK7k35l8rujWtQNt3Gce52V/WnW jaUPvFNk4nT7NjtK08z9XujS8xR0W7mI3D49S7HAxlX7zXjB+8V0wkqaSXAaO30/ DNmr4rKO8a5efhUMiSNuxmvHI7fXDYxN2Dqv40zqhmLLED/FuvG7acNaJ3tcxd+f wxtAqJTXv5AvvocXpQPP1fHeS+Lb9xD0F4L3N4tOr4+MT3SHxypJ227S0dBBEIjF L5QfPBBVohU5Q+lLm9S5aZWhqb87JBI4twDklS/SKyg5bBG0pFmtErnNAvCu/Tvi 7VyehnqoER1frScZikEdacaNd7YTXLDbor/oOFmu1qlkU+K9dSH5wN4XEwcsoeRS ftkfa2urvYrMg6TuNyY5XdAy81pmafWxkyAIE7xqJnyLhYc2jndY42RbBaHmOLjq CBp4gFRZp/P9hhWpnpSf =OvRS -----END PGP SIGNATURE----- --XvKFcGCOAo53UbWW-- --===============0795095045== 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 --===============0795095045==--