Lines Matching refs: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()
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()
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()
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()
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()
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()
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()
362 return bridge; in devm_drm_panel_bridge_add_typed()
365 bridge->pre_enable_prev_first = panel->prepare_prev_first; in devm_drm_panel_bridge_add_typed()
367 *ptr = bridge; in devm_drm_panel_bridge_add_typed()
370 return bridge; in devm_drm_panel_bridge_add_typed()
376 struct drm_bridge *bridge = ptr; in drmm_drm_panel_bridge_release() local
378 drm_panel_bridge_remove(bridge); in drmm_drm_panel_bridge_release()
396 struct drm_bridge *bridge; in drmm_panel_bridge_add() local
399 bridge = drm_panel_bridge_add_typed(panel, panel->connector_type); in drmm_panel_bridge_add()
400 if (IS_ERR(bridge)) in drmm_panel_bridge_add()
401 return bridge; in drmm_panel_bridge_add()
404 bridge); in drmm_panel_bridge_add()
408 bridge->pre_enable_prev_first = panel->prepare_prev_first; in drmm_panel_bridge_add()
410 return bridge; in drmm_panel_bridge_add()
423 struct drm_connector *drm_panel_bridge_connector(struct drm_bridge *bridge) in drm_panel_bridge_connector() argument
427 panel_bridge = drm_bridge_to_panel_bridge(bridge); in drm_panel_bridge_connector()
452 struct drm_bridge *bridge; in devm_drm_of_get_bridge() local
457 &panel, &bridge); in devm_drm_of_get_bridge()
462 bridge = devm_drm_panel_bridge_add(dev, panel); in devm_drm_of_get_bridge()
464 return bridge; in devm_drm_of_get_bridge()
486 struct drm_bridge *bridge; in drmm_of_get_bridge() local
491 &panel, &bridge); in drmm_of_get_bridge()
496 bridge = drmm_panel_bridge_add(drm, panel); in drmm_of_get_bridge()
498 return bridge; in drmm_of_get_bridge()