Lines Matching +full:display +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++)
11 * display bridge of the GE B850v3. There are two physical bridges on the video
19 * Host -> LVDS|--(STDP4028)--|DP -> DP|--(STDP2690)--|DP++ -> Video output
61 struct drm_bridge bridge;
71 struct i2c_adapter *adapter = client->adapter;
76 .addr = client->addr,
81 .addr = client->addr,
89 return -1;
94 static const struct drm_edid *ge_b850v3_lvds_edid_read(struct drm_bridge *bridge,
99 client = ge_b850v3_lvds_ptr->stdp2690_i2c;
109 drm_edid = ge_b850v3_lvds_edid_read(&ge_b850v3_lvds_ptr->bridge, connector);
124 ge_b850v3_lvds_bridge_detect(struct drm_bridge *bridge, struct drm_connector *connector)
127 ge_b850v3_lvds_ptr->stdp4028_i2c;
145 return ge_b850v3_lvds_bridge_detect(&ge_b850v3_lvds_ptr->bridge, connector);
157 static int ge_b850v3_lvds_create_connector(struct drm_bridge *bridge)
159 struct drm_connector *connector = &ge_b850v3_lvds_ptr->connector;
162 connector->polled = DRM_CONNECTOR_POLL_HPD;
167 ret = drm_connector_init(bridge->dev, connector,
175 return drm_connector_attach_encoder(connector, bridge->encoder);
181 = ge_b850v3_lvds_ptr->stdp4028_i2c;
187 if (ge_b850v3_lvds_ptr->bridge.dev)
188 drm_kms_helper_hotplug_event(ge_b850v3_lvds_ptr->bridge.dev);
193 static int ge_b850v3_lvds_attach(struct drm_bridge *bridge,
198 = ge_b850v3_lvds_ptr->stdp4028_i2c;
200 /* Configures the bridge to re-enable interrupts after each ack. */
213 return ge_b850v3_lvds_create_connector(bridge);
229 ge_b850v3_lvds_ptr = devm_drm_bridge_alloc(dev, struct ge_b850v3_lvds, bridge,
246 * removing the bridge in their remove() function
249 !ge_b850v3_lvds_ptr->stdp2690_i2c ||
250 !ge_b850v3_lvds_ptr->stdp4028_i2c)
253 drm_bridge_remove(&ge_b850v3_lvds_ptr->bridge);
262 struct i2c_client *stdp4028_i2c = ge_b850v3_lvds_ptr->stdp4028_i2c;
263 struct device *dev = &stdp4028_i2c->dev;
265 /* drm bridge initialization */
266 ge_b850v3_lvds_ptr->bridge.ops = DRM_BRIDGE_OP_DETECT |
268 ge_b850v3_lvds_ptr->bridge.type = DRM_MODE_CONNECTOR_DisplayPort;
269 ge_b850v3_lvds_ptr->bridge.of_node = dev->of_node;
270 drm_bridge_add(&ge_b850v3_lvds_ptr->bridge);
277 if (!stdp4028_i2c->irq)
280 return devm_request_threaded_irq(&stdp4028_i2c->dev,
281 stdp4028_i2c->irq, NULL,
284 "ge-b850v3-lvds-dp", ge_b850v3_lvds_ptr);
289 struct device *dev = &stdp4028_i2c->dev;
297 ge_b850v3_lvds_ptr->stdp4028_i2c = stdp4028_i2c;
301 if (!ge_b850v3_lvds_ptr->stdp2690_i2c)
319 { .compatible = "megachips,stdp4028-ge-b850v3-fw" },
329 .name = "stdp4028-ge-b850v3-fw",
336 struct device *dev = &stdp2690_i2c->dev;
344 ge_b850v3_lvds_ptr->stdp2690_i2c = stdp2690_i2c;
348 if (!ge_b850v3_lvds_ptr->stdp4028_i2c)
366 { .compatible = "megachips,stdp2690-ge-b850v3-fw" },
376 .name = "stdp2690-ge-b850v3-fw",
406 MODULE_DESCRIPTION("GE LVDS to DP++ display bridge)");