Commit 0aa5eb3a authored by Daniel Vetter's avatar Daniel Vetter

drm/panel: Small documentation polish

Need to make sure people can find the panel-bridge to avoid typing too
much.
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190111164048.29067-3-daniel.vetter@ffwll.ch
parent 3fbdfe99
...@@ -134,8 +134,8 @@ static const struct drm_bridge_funcs panel_bridge_bridge_funcs = { ...@@ -134,8 +134,8 @@ static const struct drm_bridge_funcs panel_bridge_bridge_funcs = {
}; };
/** /**
* drm_panel_bridge_add - Creates a drm_bridge and drm_connector that * drm_panel_bridge_add - Creates a &drm_bridge and &drm_connector that
* just calls the appropriate functions from drm_panel. * just calls the appropriate functions from &drm_panel.
* *
* @panel: The drm_panel being wrapped. Must be non-NULL. * @panel: The drm_panel being wrapped. Must be non-NULL.
* @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be * @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be
...@@ -149,9 +149,12 @@ static const struct drm_bridge_funcs panel_bridge_bridge_funcs = { ...@@ -149,9 +149,12 @@ static const struct drm_bridge_funcs panel_bridge_bridge_funcs = {
* passed to drm_bridge_attach(). The drm_panel_prepare() and related * passed to drm_bridge_attach(). The drm_panel_prepare() and related
* functions can be dropped from the encoder driver (they're now * functions can be dropped from the encoder driver (they're now
* called by the KMS helpers before calling into the encoder), along * called by the KMS helpers before calling into the encoder), along
* with connector creation. When done with the bridge, * with connector creation. When done with the bridge (after
* drm_bridge_detach() should be called as normal, then * drm_mode_config_cleanup() if the bridge has already been attached), then
* drm_panel_bridge_remove() to free it. * drm_panel_bridge_remove() to free it.
*
* See devm_drm_panel_bridge_add() for an automatically manged version of this
* function.
*/ */
struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel, struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel,
u32 connector_type) u32 connector_type)
...@@ -210,6 +213,17 @@ static void devm_drm_panel_bridge_release(struct device *dev, void *res) ...@@ -210,6 +213,17 @@ static void devm_drm_panel_bridge_release(struct device *dev, void *res)
drm_panel_bridge_remove(*bridge); drm_panel_bridge_remove(*bridge);
} }
/**
* devm_drm_panel_bridge_add - Creates a managed &drm_bridge and &drm_connector
* that just calls the appropriate functions from &drm_panel.
* @dev: device to tie the bridge lifetime to
* @panel: The drm_panel being wrapped. Must be non-NULL.
* @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be
* created.
*
* This is the managed version of drm_panel_bridge_add() which automatically
* calls drm_panel_bridge_remove() when @dev is unbound.
*/
struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev, struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev,
struct drm_panel *panel, struct drm_panel *panel,
u32 connector_type) u32 connector_type)
......
...@@ -36,6 +36,9 @@ static LIST_HEAD(panel_list); ...@@ -36,6 +36,9 @@ static LIST_HEAD(panel_list);
* The DRM panel helpers allow drivers to register panel objects with a * The DRM panel helpers allow drivers to register panel objects with a
* central registry and provide functions to retrieve those panels in display * central registry and provide functions to retrieve those panels in display
* drivers. * drivers.
*
* For easy integration into drivers using the &drm_bridge infrastructure please
* take look at drm_panel_bridge_add() and devm_drm_panel_bridge_add().
*/ */
/** /**
......
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