From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH 1/2] drm/i915: use runtime irq suspend/resume in freeze/thaw Date: Thu, 19 Jun 2014 16:24:21 +0300 Message-ID: <1403184261.27481.6.camel@intelbox> References: <1403110376-1889-1-git-send-email-jbarnes@virtuousgeek.org> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1804845131==" Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 332906E8A8 for ; Thu, 19 Jun 2014 06:24:39 -0700 (PDT) In-Reply-To: <1403110376-1889-1-git-send-email-jbarnes@virtuousgeek.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1804845131== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-rQCPdGunMO5LRYLx4XKZ" --=-rQCPdGunMO5LRYLx4XKZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2014-06-18 at 09:52 -0700, Jesse Barnes wrote: > We don't need to uninstall the full handler, simply disabling interrupts > ought to be enough. >=20 > Signed-off-by: Jesse Barnes Reviewed-by: Imre Deak For follow-up: I agree with Daniel that we should add a new helper and use it instead of the current dev->irq_enabled checks elsewhere. Also we should add this check to the irq handlers themselves. --Imre > --- > drivers/gpu/drm/i915/i915_drv.c | 5 ++--- > drivers/gpu/drm/i915/intel_pm.c | 4 ++-- > 2 files changed, 4 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_= drv.c > index 7ae4e2a..be97741 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -522,7 +522,7 @@ static int i915_drm_freeze(struct drm_device *dev) > return error; > } > =20 > - drm_irq_uninstall(dev); > + intel_runtime_pm_disable_interrupts(dev); > dev_priv->enable_hotplug_processing =3D false; > =20 > intel_suspend_gt_powersave(dev); > @@ -646,8 +646,7 @@ static int __i915_drm_thaw(struct drm_device *dev, bo= ol restore_gtt_mappings) > } > mutex_unlock(&dev->struct_mutex); > =20 > - /* We need working interrupts for modeset enabling ... */ > - drm_irq_install(dev, dev->pdev->irq); > + intel_runtime_pm_restore_interrupts(dev); > =20 > intel_modeset_init_hw(dev); > =20 > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel= _pm.c > index 2043c4b..0bf9b0c 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -4879,7 +4879,7 @@ void intel_suspend_gt_powersave(struct drm_device *= dev) > struct drm_i915_private *dev_priv =3D dev->dev_private; > =20 > /* Interrupts should be disabled already to avoid re-arming. */ > - WARN_ON(dev->irq_enabled); > + WARN_ON(dev->irq_enabled && !dev_priv->pm.irqs_disabled); > =20 > flush_delayed_work(&dev_priv->rps.delayed_resume_work); > =20 > @@ -4891,7 +4891,7 @@ void intel_disable_gt_powersave(struct drm_device *= dev) > struct drm_i915_private *dev_priv =3D dev->dev_private; > =20 > /* Interrupts should be disabled already to avoid re-arming. */ > - WARN_ON(dev->irq_enabled); > + WARN_ON(dev->irq_enabled && !dev_priv->pm.irqs_disabled); > =20 > if (IS_IRONLAKE_M(dev)) { > ironlake_disable_drps(dev); --=-rQCPdGunMO5LRYLx4XKZ 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 v1.4.14 (GNU/Linux) iQEcBAABAgAGBQJTouSFAAoJEORIIAnNuWDF9BgIAI85/Xbh1QmLGaQk063UMUJQ mPTtVawnwCKRJwxMCqehbMXzTowDzFhpfRc8KT2XW6iMSSSrJvwbVK/BeXmmhS4L Op2RSbcBwrRMlY26DYKKb9/Ghneg1fIwS92LDQugHaWsdeXt68B2xDC3N8i2hohB FavJmJHmR+eme92UxAV6ZY70TlxbdwbAOinMHP874ivusqJ85XxKPsO6k+Pq+QW3 qnCu3PVHD/128XwAYZq40eYS2V8E99BcmGyU8RC70vunNHGm2KW9Jt5B3Dy4wK7Q NOkMW2Rujyz65mGvGZDZpOY4gtU5pFZ/FycafT4wClrGCZiI6igajMxuo1qh2Ao= =AeU+ -----END PGP SIGNATURE----- --=-rQCPdGunMO5LRYLx4XKZ-- --===============1804845131== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1804845131==--