Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: Small documentation polish

Need to make sure people can find the panel-bridge to avoid typing too
much.

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190111164048.29067-3-daniel.vetter@ffwll.ch

+21 -4
+18 -4
drivers/gpu/drm/bridge/panel.c
··· 134 134 }; 135 135 136 136 /** 137 - * drm_panel_bridge_add - Creates a drm_bridge and drm_connector that 138 - * just calls the appropriate functions from drm_panel. 137 + * drm_panel_bridge_add - Creates a &drm_bridge and &drm_connector that 138 + * just calls the appropriate functions from &drm_panel. 139 139 * 140 140 * @panel: The drm_panel being wrapped. Must be non-NULL. 141 141 * @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be ··· 149 149 * passed to drm_bridge_attach(). The drm_panel_prepare() and related 150 150 * functions can be dropped from the encoder driver (they're now 151 151 * called by the KMS helpers before calling into the encoder), along 152 - * with connector creation. When done with the bridge, 153 - * drm_bridge_detach() should be called as normal, then 152 + * with connector creation. When done with the bridge (after 153 + * drm_mode_config_cleanup() if the bridge has already been attached), then 154 154 * drm_panel_bridge_remove() to free it. 155 + * 156 + * See devm_drm_panel_bridge_add() for an automatically manged version of this 157 + * function. 155 158 */ 156 159 struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel, 157 160 u32 connector_type) ··· 213 210 drm_panel_bridge_remove(*bridge); 214 211 } 215 212 213 + /** 214 + * devm_drm_panel_bridge_add - Creates a managed &drm_bridge and &drm_connector 215 + * that just calls the appropriate functions from &drm_panel. 216 + * @dev: device to tie the bridge lifetime to 217 + * @panel: The drm_panel being wrapped. Must be non-NULL. 218 + * @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be 219 + * created. 220 + * 221 + * This is the managed version of drm_panel_bridge_add() which automatically 222 + * calls drm_panel_bridge_remove() when @dev is unbound. 223 + */ 216 224 struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev, 217 225 struct drm_panel *panel, 218 226 u32 connector_type)
+3
drivers/gpu/drm/drm_panel.c
··· 36 36 * The DRM panel helpers allow drivers to register panel objects with a 37 37 * central registry and provide functions to retrieve those panels in display 38 38 * drivers. 39 + * 40 + * For easy integration into drivers using the &drm_bridge infrastructure please 41 + * take look at drm_panel_bridge_add() and devm_drm_panel_bridge_add(). 39 42 */ 40 43 41 44 /**