Commit 2cb5974d authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/simple-kms: Fix documentation for drm_simple_encoder_init()

Brings the documentation of drm_simple_encoder_init() in sync with the
function's signature. Also add a paragraph clarifying the management of
the encoder's memory.

v2:
	* document memory management
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Fixes: 63170ac6 ("drm/simple-kms: Add drm_simple_encoder_{init,create}()")
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20200304145312.26458-1-tzimmermann@suse.de
parent 5b660336
......@@ -38,9 +38,10 @@ static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
};
/**
* drm_simple_encoder_init - Initialize a preallocated encoder
* drm_simple_encoder_init - Initialize a preallocated encoder with
* basic functionality.
* @dev: drm device
* @funcs: callbacks for this encoder
* @encoder: the encoder to initialize
* @encoder_type: user visible type of the encoder
*
* Initialises a preallocated encoder that has no further functionality.
......@@ -48,6 +49,15 @@ static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = {
* The encoder will be cleaned up automatically as part of the mode-setting
* cleanup.
*
* The caller of drm_simple_encoder_init() is responsible for freeing
* the encoder's memory after the encoder has been cleaned up. At the
* moment this only works reliably if the encoder data structure is
* stored in the device structure. Free the encoder's memory as part of
* the device release function.
*
* FIXME: Later improvements to DRM's resource management may allow for
* an automated kfree() of the encoder's memory.
*
* Returns:
* Zero on success, error code on failure.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment