From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 05/12] drm/i915: Remove drm_vblank_pre/post_modeset calls Date: Wed, 21 May 2014 13:40:02 +0200 Message-ID: <20140521114001.GH2014@ulmo> References: <1400093477-3217-1-git-send-email-daniel.vetter@ffwll.ch> <1400093477-3217-6-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0773338275==" Return-path: In-Reply-To: <1400093477-3217-6-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Intel Graphics Development , DRI Development List-Id: dri-devel@lists.freedesktop.org --===============0773338275== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHbokkKX1kTiQeDC" Content-Disposition: inline --xHbokkKX1kTiQeDC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 14, 2014 at 08:51:07PM +0200, Daniel Vetter wrote: > Originally these functions have been for user modesetting drivers to > ensure vblank processing doesn't fall over completely around modeset > changes. This has been carried over ever since then. >=20 > Now that Ville cleaned our vblank handling with an explicit > drm_vblank_off/on braket when disabling/enabling crtcs. So this seems s/braket/bracket/ > to be unnecessary now. Should we document that drivers should start converting to this new set of functions? Maybe deprecate the drm_vblank_pre/post_modeset()? > The most important side effect was that due to > the delayed vblank disabling we have been pretty much guaranteed to > receive a vblank interrupt soonish after a crtc was enabled. I don't understand what this sentence means and whether it relates to code prior to or after this patch. > Note that our vblank handling across modeset is still fairly decent > fubar - we don't actually handle vblank counter all to well. > drm_update_vblank_count will make sure that the frame counter always > rolls forward, but userspace isn't really all to ready to cope with > the big jumps this causes. >=20 > This isn't a big mostly because the hardware retains the frame Not a big what? > counter. But with runtime pm and also across suspend/resume we fall > over. >=20 > Fixing this is a lot more involved and also needs som i-g-ts. So > material for another patch series. >=20 > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/intel_display.c | 5 ----- > 1 file changed, 5 deletions(-) >=20 > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/= intel_display.c > index 858c393b051f..d0eff53a8ad1 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -7207,15 +7207,10 @@ static int intel_crtc_mode_set(struct drm_crtc *c= rtc, > struct intel_encoder *encoder; > struct intel_crtc *intel_crtc =3D to_intel_crtc(crtc); > struct drm_display_mode *mode =3D &intel_crtc->config.requested_mode; > - int pipe =3D intel_crtc->pipe; > int ret; > =20 > - drm_vblank_pre_modeset(dev, pipe); > - > ret =3D dev_priv->display.crtc_mode_set(crtc, x, y, fb); > =20 > - drm_vblank_post_modeset(dev, pipe); > - > if (ret !=3D 0) Nit: There's now a blank line between ret =3D ... and if (...). Thierry --xHbokkKX1kTiQeDC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTfJCRAAoJEN0jrNd/PrOh37sP/2gq2bngc4WGb+tFoWBzSiFC utMvuCtzHJiWpnpcPpt8LQ3V6kdWR2WAZcBgmorqf7L1jHmB23GrSpptIaaDkz0a LmGJtmRN5Uk6jI9sJt1HJp2ZGVJ3miUc2PwRhr0LjMs5YnGlMGuaC9tdsel82UmR 5MxSE6becbM46R9o/8UInUGVNok6NoAjt4NW6mbyjfPiOcQU+fSdA7oz3Mjxa23T 2wbxtoWoIc3pAX4gd30outoRkos3KTY0Q12GhdNGIS2INyyz4hXpch6ybM0b3gsq oQKc5S/F59HgJMRa2+zjfOcsqZn7v8NnW8aaMW7roXv/BjnBvWqIm3qR2I9QlsIk 1Q5lGy93S+GkXmylbG3mI/skA/zUe+V2jff65ptRqx55s/Rfm/22hRTt9p27DHuU OX1y7M3UulPQ+VTXvuKt2E8rcnAUvyFUEG9SLt3XHNX6SjycaaiTBTaHwixBdzgl bTGw5E7gJn4etmrfXosqtr52cQ4+kIFw7YBRRc88n2qVD3MQtyFYVoVs1qlspPnC PGvGAtxjPldyKFu1uHaMG7ZRTGqLc2bqHI71DogckAfM1RVi7/9yJGPodstm77lv MMyDC4ZSxWkfrzAXbGaifiH07tdAGuG8WsAa2pi41tOcVV/SHnQMj9zuBD5er+0I DG3BvlzwyxAoQz1BCeVz =L/w4 -----END PGP SIGNATURE----- --xHbokkKX1kTiQeDC-- --===============0773338275== 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 --===============0773338275==--