aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge/panel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/bridge/panel.c')
-rw-r--r--drivers/gpu/drm/bridge/panel.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
index 7cbaba213ef6..37baa79e95c3 100644
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -134,8 +134,8 @@ static const struct drm_bridge_funcs panel_bridge_bridge_funcs = {
134}; 134};
135 135
136/** 136/**
137 * drm_panel_bridge_add - Creates a drm_bridge and drm_connector that 137 * drm_panel_bridge_add - Creates a &drm_bridge and &drm_connector that
138 * just calls the appropriate functions from drm_panel. 138 * just calls the appropriate functions from &drm_panel.
139 * 139 *
140 * @panel: The drm_panel being wrapped. Must be non-NULL. 140 * @panel: The drm_panel being wrapped. Must be non-NULL.
141 * @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be 141 * @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 * passed to drm_bridge_attach(). The drm_panel_prepare() and related 149 * passed to drm_bridge_attach(). The drm_panel_prepare() and related
150 * functions can be dropped from the encoder driver (they're now 150 * functions can be dropped from the encoder driver (they're now
151 * called by the KMS helpers before calling into the encoder), along 151 * called by the KMS helpers before calling into the encoder), along
152 * with connector creation. When done with the bridge, 152 * with connector creation. When done with the bridge (after
153 * drm_bridge_detach() should be called as normal, then 153 * drm_mode_config_cleanup() if the bridge has already been attached), then
154 * drm_panel_bridge_remove() to free it. 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 */
156struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel, 159struct drm_bridge *drm_panel_bridge_add(struct drm_panel *panel,
157 u32 connector_type) 160 u32 connector_type)
@@ -210,6 +213,17 @@ static void devm_drm_panel_bridge_release(struct device *dev, void *res)
210 drm_panel_bridge_remove(*bridge); 213 drm_panel_bridge_remove(*bridge);
211} 214}
212 215
216/**
217 * devm_drm_panel_bridge_add - Creates a managed &drm_bridge and &drm_connector
218 * that just calls the appropriate functions from &drm_panel.
219 * @dev: device to tie the bridge lifetime to
220 * @panel: The drm_panel being wrapped. Must be non-NULL.
221 * @connector_type: The DRM_MODE_CONNECTOR_* for the connector to be
222 * created.
223 *
224 * This is the managed version of drm_panel_bridge_add() which automatically
225 * calls drm_panel_bridge_remove() when @dev is unbound.
226 */
213struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev, 227struct drm_bridge *devm_drm_panel_bridge_add(struct device *dev,
214 struct drm_panel *panel, 228 struct drm_panel *panel,
215 u32 connector_type) 229 u32 connector_type)