From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH 6/6] drm/i915: get runtime PM at intel_set_mode Date: Mon, 10 Mar 2014 18:17:59 +0200 Message-ID: <1394468279.6299.47.camel@intelbox> References: <1394233524-3522-1-git-send-email-przanoni@gmail.com> <1394233524-3522-7-git-send-email-przanoni@gmail.com> <20140308100406.GI25837@phenom.ffwll.local> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0062161363==" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 3890AFA630 for ; Mon, 10 Mar 2014 09:18:03 -0700 (PDT) In-Reply-To: <20140308100406.GI25837@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org --===============0062161363== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-WKrjN6VQXtFO2JD0BbT4" --=-WKrjN6VQXtFO2JD0BbT4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, 2014-03-08 at 11:04 +0100, Daniel Vetter wrote: > On Fri, Mar 07, 2014 at 08:05:24PM -0300, Paulo Zanoni wrote: > > From: Paulo Zanoni > >=20 > > Otherwise, when we run intel_modeset_check_state we may already be > > runtime suspended, and our state checking code will read registers > > while the device is suspended. This can only happen if your > > autosuspend_delay_ms is low (not the default 10s) and i915.pc8_timeout > > is set to zero. > >=20 > > NOTE: The correct way to fix this problem would be to properly get/put > > runtime PM at the get_config/state functions. I still didn't do this, > > so I'll keep this patch on the series because it fixes the remaining > > WARNs we get while running the pm_pc8 test suite. It's fine if we > > don't merge this. The problem >=20 > Imre has added a bunch more power well enabling checks ... do we still > have gaps in our coverage? We still need Paulo's "[PATCH 03/16] drm/i915: get/put runtime PM when we get/put a power domain", but after that we don't need the extra intel_runtime_pm_get/put calls here. > If it's not a terrible lot of them I'd prefer we properly close those > instead of this little hack here. So still not too happy to merge this ;-= ) > -Daniel >=20 > >=20 > > v2: - Add the note above. > >=20 > > Reviewed-by: Jesse Barnes > > Signed-off-by: Paulo Zanoni > > --- > > drivers/gpu/drm/i915/intel_display.c | 5 +++++ > > 1 file changed, 5 insertions(+) > >=20 > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i91= 5/intel_display.c > > index 0868afb..dc2b377 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -9785,13 +9785,18 @@ static int intel_set_mode(struct drm_crtc *crtc= , > > struct drm_display_mode *mode, > > int x, int y, struct drm_framebuffer *fb) > > { > > + struct drm_device *dev =3D crtc->dev; > > + struct drm_i915_private *dev_priv =3D dev->dev_private; > > int ret; > > =20 > > + intel_runtime_pm_get(dev_priv); > > + > > ret =3D __intel_set_mode(crtc, mode, x, y, fb); > > =20 > > if (ret =3D=3D 0) > > intel_modeset_check_state(crtc->dev); > > =20 > > + intel_runtime_pm_put(dev_priv); > > return ret; > > } > > =20 > > --=20 > > 1.8.5.3 > >=20 > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx >=20 --=-WKrjN6VQXtFO2JD0BbT4 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) iQEcBAABAgAGBQJTHeW3AAoJEORIIAnNuWDF58wH/jSgTby1YZsKWLAqYGkc1CHd C9ZpSUz5T43TVlynNfkU0YehZRCLF1fIqHzuo5mqWVvMqys75/IpFGXOdePbXmHL 7atSQc/ngqe0z9dZGGTgD8PSyjM8XuUw57yPKjcUy+wKPNzj53Mlijze5Ebfk7UQ tsAjvudF67T4GCc8b2FP4kMBOsiB1gFo+RtzHCBiluRLGwQG4h2NOQXUFOuyCWQt biUBT4VezJSeFSSk5f31K/Cb/Gom0+k2DcTnAMpxofu+Wx1H5Au/oxpBGJUzLgDo +d5ARVUdqiahUyBDlWD9PAdNCJhV9uLUbYn88UDoG46YF8o3sq1BzWypQmxt1ZQ= =58m+ -----END PGP SIGNATURE----- --=-WKrjN6VQXtFO2JD0BbT4-- --===============0062161363== 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 --===============0062161363==--