From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 10/37] drm/doc: vblank cleanup Date: Thu, 15 Jun 2017 14:58:15 +0200 Message-ID: <20170615125815.GD30056@ulmo> References: <20170524145212.27837-1-daniel.vetter@ffwll.ch> <20170524145212.27837-11-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0537195751==" Return-path: In-Reply-To: <20170524145212.27837-11-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: Daniel Vetter , Intel Graphics Development , DRI Development List-Id: dri-devel@lists.freedesktop.org --===============0537195751== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="AkbCVLjbJ9qUtAXD" Content-Disposition: inline --AkbCVLjbJ9qUtAXD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 24, 2017 at 04:51:45PM +0200, Daniel Vetter wrote: [...] > -Resources allocated by :c:func:`drm_vblank_init()` must be freed > -with a call to :c:func:`drm_vblank_cleanup()` in the driver unload > -operation handler. I think perhaps this is the reason why this was cargo-culted. It's confusing to have the documentation say drivers have to call it, when in fact the core already does. > @@ -396,6 +436,8 @@ EXPORT_SYMBOL(drm_vblank_cleanup); > * @num_crtcs: number of CRTCs supported by @dev > * > * This function initializes vblank support for @num_crtcs display pipelines. > + * Drivers do not need to call drm_vblank_cleanup(), cleanup is already handled > + * by the DRM core. This is key, I think, in understanding why the patch series is correct. Maybe this should go into the cover letter to provide more context. That said, there is one case where the core wouldn't be calling the drm_vblank_cleanup() as part of teardown, and that is when the driver implements a ->release() callback. From a very cursory look i915 is the only driver that does so, and it ends up calling drm_dev_fini() and therefore drm_vblank_cleanup(). Given all of the above, for the series: Acked-by: Thierry Reding --AkbCVLjbJ9qUtAXD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAllChGQACgkQ3SOs138+ s6GWbQ//d7wiE1aqUElAenipAhW+Cv9RgGjohe5RCoJhilpmTxaZEmniKSJ9GCUk pxdtyRYkMk0WEOLaQsf8HB42Xnr0ZBi2nWr3IeF321t8ZPBJ6rUZg1DA7IamXOCO sKcxKEtAQOqzmnEU4ag2j41uPiFh2Icqj1VLbwBg2rloIZqfAiOIgY+sj5GEHZSl 2HBon6FViUtp7Kr+a7i7dpM1PLlmVgBQ7Yb5+68l7HqDpnNJCVdhqSxa/i62qN3s x356mPa50KdGxNzQA0UhbT6IzeUb7GomDGR5U38oXU+tC+46aZQoZziNk8TLKxuw ygBzuGjgH9+7rHInRJhZeqLsug0VvX56NORi0MJacfzUEDjgrT4w9A5TLdMQjSzS U6FnLtVV8fIjQEhyYEw0jRTf8zJVeTGuHlhRHo860f4JpGQBt1hYx6kfW4FSBlOQ +Vzq9/s2zMIvoXGSGF3fAn5dIgSPAaAKwpyv6zL3fZGBhTHDL78nS/VzXMotW8b7 PmQR62WY02PjutMRJ6Hk8yqvXqTAXPYTlvKI3xeUFgCHhEBsG4blNwiDlEeHU1Up PN3tbprVT5aHMNPIe9kYk/CF3BE1hon9nFF7nmBOYw28aIBU11JC+KfavxVxvkWW l+Qrk6GAqFOEtDE7ELgBQmtio8Ng0GFUQ1to2f1NJnNDyb8zAbI= =iBrE -----END PGP SIGNATURE----- --AkbCVLjbJ9qUtAXD-- --===============0537195751== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0537195751==--