Lines Matching full:bridge

19 	struct drm_bridge bridge;  member
26 drm_bridge_to_panel_bridge(struct drm_bridge *bridge) in drm_bridge_to_panel_bridge() argument
28 return container_of(bridge, struct panel_bridge, bridge); in drm_bridge_to_panel_bridge()
58 static int panel_bridge_attach(struct drm_bridge *bridge, in panel_bridge_attach() argument
61 struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); in panel_bridge_attach()
68 if (!bridge->encoder) { in panel_bridge_attach()
76 ret = drm_connector_init(bridge->dev, connector, in panel_bridge_attach()
85 bridge->encoder); in panel_bridge_attach()
87 if (bridge->dev->registered) { in panel_bridge_attach()
96 static void panel_bridge_detach(struct drm_bridge *bridge) in panel_bridge_detach() argument
98 struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); in panel_bridge_detach()
106 * drm_device pointer can only be retrieved when the bridge is attached. in panel_bridge_detach()
112 static void panel_bridge_pre_enable(struct drm_bridge *bridge) in panel_bridge_pre_enable() argument
114 struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); in panel_bridge_pre_enable()
119 static void panel_bridge_enable(struct drm_bridge *bridge) in panel_bridge_enable() argument
121 struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); in panel_bridge_enable()
126 static void panel_bridge_disable(struct drm_bridge *bridge) in panel_bridge_disable() argument
128 struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); in panel_bridge_disable()
133 static void panel_bridge_post_disable(struct drm_bridge *bridge) in panel_bridge_post_disable() argument
135 struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); in panel_bridge_post_disable()
140 static int panel_bridge_get_modes(struct drm_bridge *bridge, in panel_bridge_get_modes() argument
143 struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); in panel_bridge_get_modes()
148 static void panel_bridge_debugfs_init(struct drm_bridge *bridge, in panel_bridge_debugfs_init() argument
151 struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge); in panel_bridge_debugfs_init()
177 * @bridge: The drm_bridge to be checked.
179 * Returns true if the bridge is a panel bridge, or false otherwise.
181 bool drm_bridge_is_panel(const struct drm_bridge *bridge) in drm_bridge_is_panel() argument
183 return bridge->funcs == &panel_bridge_bridge_funcs; in drm_bridge_is_panel()
197 * wrap that panel in the new bridge, and the result can then be
201 * with connector creation. When done with the bridge (after
202 * drm_mode_config_cleanup() if the bridge has already been attached), then
250 panel_bridge->bridge.funcs = &panel_bridge_bridge_funcs; in drm_panel_bridge_add_typed()
252 panel_bridge->bridge.of_node = panel->dev->of_node; in drm_panel_bridge_add_typed()
254 panel_bridge->bridge.ops = DRM_BRIDGE_OP_MODES; in drm_panel_bridge_add_typed()
255 panel_bridge->bridge.type = connector_type; in drm_panel_bridge_add_typed()
257 drm_bridge_add(&panel_bridge->bridge); in drm_panel_bridge_add_typed()
259 return &panel_bridge->bridge; in drm_panel_bridge_add_typed()
267 * @bridge: The drm_bridge being freed.
269 void drm_panel_bridge_remove(struct drm_bridge *bridge) in drm_panel_bridge_remove() argument
273 if (!bridge) in drm_panel_bridge_remove()
276 if (bridge->funcs != &panel_bridge_bridge_funcs) in drm_panel_bridge_remove()
279 panel_bridge = drm_bridge_to_panel_bridge(bridge); in drm_panel_bridge_remove()
281 drm_bridge_remove(bridge); in drm_panel_bridge_remove()
282 devm_kfree(panel_bridge->panel->dev, bridge); in drm_panel_bridge_remove()
288 * from the bridge that can be transformed to panel bridge.
291 * @bridge: The drm_bridge to be transformed to panel bridge.
296 struct drm_bridge *bridge) in drm_panel_bridge_set_orientation() argument
300 panel_bridge = drm_bridge_to_panel_bridge(bridge); in drm_panel_bridge_set_orientation()
309 struct drm_bridge **bridge = res; in devm_drm_panel_bridge_release() local
311 drm_panel_bridge_remove(*bridge); in devm_drm_panel_bridge_release()
317 * @dev: device to tie the bridge lifetime to
337 * @dev: device to tie the bridge lifetime to
352 struct drm_bridge **ptr, *bridge; in devm_drm_panel_bridge_add_typed() local
359 bridge = drm_panel_bridge_add_typed(panel, connector_type); in devm_drm_panel_bridge_add_typed()
360 if (!IS_ERR(bridge)) { in devm_drm_panel_bridge_add_typed()
361 *ptr = bridge; in devm_drm_panel_bridge_add_typed()
367 return bridge; in devm_drm_panel_bridge_add_typed()
373 struct drm_bridge *bridge = ptr; in drmm_drm_panel_bridge_release() local
375 drm_panel_bridge_remove(bridge); in drmm_drm_panel_bridge_release()
383 * @drm: DRM device to tie the bridge lifetime to
393 struct drm_bridge *bridge; in drmm_panel_bridge_add() local
396 bridge = drm_panel_bridge_add_typed(panel, panel->connector_type); in drmm_panel_bridge_add()
397 if (IS_ERR(bridge)) in drmm_panel_bridge_add()
398 return bridge; in drmm_panel_bridge_add()
401 bridge); in drmm_panel_bridge_add()
405 return bridge; in drmm_panel_bridge_add()
410 * drm_panel_bridge_connector - return the connector for the panel bridge
411 * @bridge: The drm_bridge.
418 struct drm_connector *drm_panel_bridge_connector(struct drm_bridge *bridge) in drm_panel_bridge_connector() argument
422 panel_bridge = drm_bridge_to_panel_bridge(bridge); in drm_panel_bridge_connector()
430 * devm_drm_of_get_bridge - Return next bridge in the chain
431 * @dev: device to tie the bridge lifetime to
437 * and returns the associated bridge if any, or creates and returns a
438 * drm panel bridge instance if a panel is connected.
440 * Returns a pointer to the bridge if successful, or an error pointer
447 struct drm_bridge *bridge; in devm_drm_of_get_bridge() local
452 &panel, &bridge); in devm_drm_of_get_bridge()
457 bridge = devm_drm_panel_bridge_add(dev, panel); in devm_drm_of_get_bridge()
459 return bridge; in devm_drm_of_get_bridge()
464 * drmm_of_get_bridge - Return next bridge in the chain
465 * @drm: device to tie the bridge lifetime to
471 * and returns the associated bridge if any, or creates and returns a
472 * drm panel bridge instance if a panel is connected.
474 * Returns a drmm managed pointer to the bridge if successful, or an error
481 struct drm_bridge *bridge; in drmm_of_get_bridge() local
486 &panel, &bridge); in drmm_of_get_bridge()
491 bridge = drmm_panel_bridge_add(drm, panel); in drmm_of_get_bridge()
493 return bridge; in drmm_of_get_bridge()