[PATCH 10/37] drm/doc: vblank cleanup
Thierry Reding
thierry.reding at gmail.com
Thu Jun 15 12:58:15 UTC 2017
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 <treding at nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170615/49197c5e/attachment.sig>
More information about the dri-devel
mailing list