From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH] drm/i915: fix rps.vlv_work initialization Date: Tue, 01 Oct 2013 20:46:21 +0300 Message-ID: <1380649581.17657.7.camel@intelbox> References: <1380640286-26306-1-git-send-email-imre.deak@intel.com> <20131001155535.GO9395@intel.com> <1380646550.17657.2.camel@intelbox> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1955141795==" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id BB651E776B for ; Tue, 1 Oct 2013 10:46:36 -0700 (PDT) In-Reply-To: <1380646550.17657.2.camel@intelbox> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1955141795== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-9/RqhzN4hVtbWae59VQP" --=-9/RqhzN4hVtbWae59VQP Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2013-10-01 at 19:55 +0300, Imre Deak wrote: > On Tue, 2013-10-01 at 18:55 +0300, Ville Syrj=C3=A4l=C3=A4 wrote: > > On Tue, Oct 01, 2013 at 06:11:26PM +0300, Imre Deak wrote: > > > During driver loading we are initializing rps.vlv_work in > > > valleyview_enable_rps() via the rps.delayed_resume_work delayed work. > > > This is too late since we are using vlv_work already via > > > i915_driver_load()->intel_uncore_sanitize()-> > > > intel_disable_gt_powersave(). This at least leads to the following > > > kernel warning: > > >=20 > > > INFO: trying to register non-static key. > > > the code is fine but needs lockdep annotation. > > > turning off the locking correctness validator. > > >=20 > > > Fix this by initialzing vlv_work before we call intel_uncore_sanitize= (). > > >=20 > > > The regression was introduced in > > >=20 > > > commit 7dcd2677ea912573d9ed4bcd629b0023b2d11505 > > > Author: Konstantin Khlebnikov > > > Date: Wed Jul 17 10:22:58 2013 +0400 > > >=20 > > > drm/i915: fix long-standing SNB regression in power consumption > > > after resume > > >=20 > > > though there was no good reason to initialize the static vlv_work fro= m > > > another delayed work to begin with (especially since this will happen > > > multiple times). > > >=20 > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D69397 > > >=20 > > > Signed-off-by: Imre Deak > > > --- > > > drivers/gpu/drm/i915/intel_pm.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > >=20 > > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/i= ntel_pm.c > > > index 698257c..2a0a340 100644 > > > --- a/drivers/gpu/drm/i915/intel_pm.c > > > +++ b/drivers/gpu/drm/i915/intel_pm.c > > > @@ -3894,8 +3894,6 @@ static void valleyview_enable_rps(struct drm_de= vice *dev) > > > dev_priv->rps.rpe_delay), > > > dev_priv->rps.rpe_delay); > > > =20 > > > - INIT_DELAYED_WORK(&dev_priv->rps.vlv_work, vlv_rps_timer_work); > > > - > > > valleyview_set_rps(dev_priv->dev, dev_priv->rps.rpe_delay); > > > =20 > > > gen6_enable_rps_interrupts(dev); > > > @@ -5805,5 +5803,7 @@ void intel_pm_init(struct drm_device *dev) > > > =20 > > > INIT_DELAYED_WORK(&dev_priv->rps.delayed_resume_work, > > > intel_gen6_powersave_work); > > > + > > > + INIT_DELAYED_WORK(&dev_priv->rps.vlv_work, vlv_rps_timer_work); > >=20 > > We're initializing rps.work in intel_irq_init(). Maybe we should try to > > keep rps related stuff together? >=20 > Yes, makes sense. I'll send v2 moving both init work to > intel_irq_init(). Hm, actually for that we'd have to export the two handler functions and since all of these really belong to intel_pm.c I'd rather just leave the work init there too. --Imre --=-9/RqhzN4hVtbWae59VQP 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.12 (GNU/Linux) iQEcBAABAgAGBQJSSwptAAoJEORIIAnNuWDFB8IH/i8sEPi/rb5bonvpkGFHHxt2 E/j78Zozh2dzPoi5ntyYWGdOdtSOArBFXkWHDtMMXFO1gHwUQ0/iE1AI5L/HajDP zOqfZOYa+dDpXtGIcNWUJZJ1MwfEkmVpTi9tVC/40NwBRowY2MAwIX0qMDe9SOQQ 1XX/AQEr1hBQQJ5uf/3hZu8l7rM5+rpng0Vc/HEframmXqhTknPIz3XrVeku30JZ J5RHLEiUMaV/CNxrD5ZoLyQdvnikfWIJ/ue2jm6dL12F/mtzEb/4yHvD0SlgGll7 zXyJlIY3n8Xspop6IE+PJC3mOYQ2O0TKV02hDdESFOYRVD3S8tEp7LpyodL+uXA= =/Zk/ -----END PGP SIGNATURE----- --=-9/RqhzN4hVtbWae59VQP-- --===============1955141795== 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 --===============1955141795==--