Lines Matching +full:dp +full:- +full:bridge

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Driver for MegaChips STDP4028 with GE B850v3 firmware (LVDS-DP)
4 * Driver for MegaChips STDP2690 with GE B850v3 firmware (DP-DP++)
10 * This driver creates a drm_bridge and a drm_connector for the LVDS to DP++
11 * display bridge of the GE B850v3. There are two physical bridges on the video
12 * signal pipeline: a STDP4028(LVDS to DP) and a STDP2690(DP to DP++). The
19 * Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output
61 struct drm_bridge bridge; member
71 struct i2c_adapter *adapter = client->adapter; in stdp2690_read_block()
76 .addr = client->addr, in stdp2690_read_block()
81 .addr = client->addr, in stdp2690_read_block()
89 return -1; in stdp2690_read_block()
94 static const struct drm_edid *ge_b850v3_lvds_edid_read(struct drm_bridge *bridge, in ge_b850v3_lvds_edid_read() argument
99 client = ge_b850v3_lvds_ptr->stdp2690_i2c; in ge_b850v3_lvds_edid_read()
109 drm_edid = ge_b850v3_lvds_edid_read(&ge_b850v3_lvds_ptr->bridge, connector); in ge_b850v3_lvds_get_modes()
130 static enum drm_connector_status ge_b850v3_lvds_bridge_detect(struct drm_bridge *bridge) in ge_b850v3_lvds_bridge_detect() argument
133 ge_b850v3_lvds_ptr->stdp4028_i2c; in ge_b850v3_lvds_bridge_detect()
151 return ge_b850v3_lvds_bridge_detect(&ge_b850v3_lvds_ptr->bridge); in ge_b850v3_lvds_detect()
163 static int ge_b850v3_lvds_create_connector(struct drm_bridge *bridge) in ge_b850v3_lvds_create_connector() argument
165 struct drm_connector *connector = &ge_b850v3_lvds_ptr->connector; in ge_b850v3_lvds_create_connector()
168 connector->polled = DRM_CONNECTOR_POLL_HPD; in ge_b850v3_lvds_create_connector()
173 ret = drm_connector_init(bridge->dev, connector, in ge_b850v3_lvds_create_connector()
181 return drm_connector_attach_encoder(connector, bridge->encoder); in ge_b850v3_lvds_create_connector()
187 = ge_b850v3_lvds_ptr->stdp4028_i2c; in ge_b850v3_lvds_irq_handler()
193 if (ge_b850v3_lvds_ptr->bridge.dev) in ge_b850v3_lvds_irq_handler()
194 drm_kms_helper_hotplug_event(ge_b850v3_lvds_ptr->bridge.dev); in ge_b850v3_lvds_irq_handler()
199 static int ge_b850v3_lvds_attach(struct drm_bridge *bridge, in ge_b850v3_lvds_attach() argument
203 = ge_b850v3_lvds_ptr->stdp4028_i2c; in ge_b850v3_lvds_attach()
205 /* Configures the bridge to re-enable interrupts after each ack. */ in ge_b850v3_lvds_attach()
218 return ge_b850v3_lvds_create_connector(bridge); in ge_b850v3_lvds_attach()
240 return -ENOMEM; in ge_b850v3_lvds_init()
253 * removing the bridge in their remove() function in ge_b850v3_lvds_remove()
256 !ge_b850v3_lvds_ptr->stdp2690_i2c || in ge_b850v3_lvds_remove()
257 !ge_b850v3_lvds_ptr->stdp4028_i2c) in ge_b850v3_lvds_remove()
260 drm_bridge_remove(&ge_b850v3_lvds_ptr->bridge); in ge_b850v3_lvds_remove()
269 struct i2c_client *stdp4028_i2c = ge_b850v3_lvds_ptr->stdp4028_i2c; in ge_b850v3_register()
270 struct device *dev = &stdp4028_i2c->dev; in ge_b850v3_register()
272 /* drm bridge initialization */ in ge_b850v3_register()
273 ge_b850v3_lvds_ptr->bridge.funcs = &ge_b850v3_lvds_funcs; in ge_b850v3_register()
274 ge_b850v3_lvds_ptr->bridge.ops = DRM_BRIDGE_OP_DETECT | in ge_b850v3_register()
276 ge_b850v3_lvds_ptr->bridge.type = DRM_MODE_CONNECTOR_DisplayPort; in ge_b850v3_register()
277 ge_b850v3_lvds_ptr->bridge.of_node = dev->of_node; in ge_b850v3_register()
278 drm_bridge_add(&ge_b850v3_lvds_ptr->bridge); in ge_b850v3_register()
285 if (!stdp4028_i2c->irq) in ge_b850v3_register()
288 return devm_request_threaded_irq(&stdp4028_i2c->dev, in ge_b850v3_register()
289 stdp4028_i2c->irq, NULL, in ge_b850v3_register()
292 "ge-b850v3-lvds-dp", ge_b850v3_lvds_ptr); in ge_b850v3_register()
297 struct device *dev = &stdp4028_i2c->dev; in stdp4028_ge_b850v3_fw_probe()
305 ge_b850v3_lvds_ptr->stdp4028_i2c = stdp4028_i2c; in stdp4028_ge_b850v3_fw_probe()
309 if (!ge_b850v3_lvds_ptr->stdp2690_i2c) in stdp4028_ge_b850v3_fw_probe()
327 { .compatible = "megachips,stdp4028-ge-b850v3-fw" },
337 .name = "stdp4028-ge-b850v3-fw",
344 struct device *dev = &stdp2690_i2c->dev; in stdp2690_ge_b850v3_fw_probe()
352 ge_b850v3_lvds_ptr->stdp2690_i2c = stdp2690_i2c; in stdp2690_ge_b850v3_fw_probe()
356 if (!ge_b850v3_lvds_ptr->stdp4028_i2c) in stdp2690_ge_b850v3_fw_probe()
374 { .compatible = "megachips,stdp2690-ge-b850v3-fw" },
384 .name = "stdp2690-ge-b850v3-fw",
414 MODULE_DESCRIPTION("GE LVDS to DP++ display bridge)");