Lines Matching refs:dvi

50 	struct tfp410 *dvi = drm_connector_to_tfp410(connector);  in tfp410_get_modes()  local
54 if (dvi->next_bridge->ops & DRM_BRIDGE_OP_EDID) { in tfp410_get_modes()
55 edid = drm_bridge_get_edid(dvi->next_bridge, connector); in tfp410_get_modes()
88 struct tfp410 *dvi = drm_connector_to_tfp410(connector); in tfp410_connector_detect() local
90 return drm_bridge_detect(dvi->next_bridge); in tfp410_connector_detect()
104 struct tfp410 *dvi; in tfp410_hpd_work_func() local
106 dvi = container_of(work, struct tfp410, hpd_work.work); in tfp410_hpd_work_func()
108 if (dvi->bridge.dev) in tfp410_hpd_work_func()
109 drm_helper_hpd_irq_event(dvi->bridge.dev); in tfp410_hpd_work_func()
114 struct tfp410 *dvi = arg; in tfp410_hpd_callback() local
116 mod_delayed_work(system_wq, &dvi->hpd_work, in tfp410_hpd_callback()
123 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_attach() local
126 ret = drm_bridge_attach(bridge->encoder, dvi->next_bridge, bridge, in tfp410_attach()
135 dev_err(dvi->dev, "Missing encoder\n"); in tfp410_attach()
139 if (dvi->next_bridge->ops & DRM_BRIDGE_OP_DETECT) in tfp410_attach()
140 dvi->connector.polled = DRM_CONNECTOR_POLL_HPD; in tfp410_attach()
142 dvi->connector.polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT; in tfp410_attach()
144 if (dvi->next_bridge->ops & DRM_BRIDGE_OP_HPD) { in tfp410_attach()
145 INIT_DELAYED_WORK(&dvi->hpd_work, tfp410_hpd_work_func); in tfp410_attach()
146 drm_bridge_hpd_enable(dvi->next_bridge, tfp410_hpd_callback, in tfp410_attach()
147 dvi); in tfp410_attach()
150 drm_connector_helper_add(&dvi->connector, in tfp410_attach()
152 ret = drm_connector_init_with_ddc(bridge->dev, &dvi->connector, in tfp410_attach()
154 dvi->next_bridge->type, in tfp410_attach()
155 dvi->next_bridge->ddc); in tfp410_attach()
157 dev_err(dvi->dev, "drm_connector_init_with_ddc() failed: %d\n", in tfp410_attach()
162 drm_display_info_set_bus_formats(&dvi->connector.display_info, in tfp410_attach()
163 &dvi->bus_format, 1); in tfp410_attach()
165 drm_connector_attach_encoder(&dvi->connector, bridge->encoder); in tfp410_attach()
172 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_detach() local
174 if (dvi->connector.dev && dvi->next_bridge->ops & DRM_BRIDGE_OP_HPD) { in tfp410_detach()
175 drm_bridge_hpd_disable(dvi->next_bridge); in tfp410_detach()
176 cancel_delayed_work_sync(&dvi->hpd_work); in tfp410_detach()
182 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_enable() local
184 gpiod_set_value_cansleep(dvi->powerdown, 0); in tfp410_enable()
189 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_disable() local
191 gpiod_set_value_cansleep(dvi->powerdown, 1); in tfp410_disable()
222 static int tfp410_parse_timings(struct tfp410 *dvi, bool i2c) in tfp410_parse_timings() argument
224 struct drm_bridge_timings *timings = &dvi->timings; in tfp410_parse_timings()
246 ep = of_graph_get_endpoint_by_regs(dvi->dev->of_node, 0, 0); in tfp410_parse_timings()
272 dvi->bus_format = MEDIA_BUS_FMT_RGB888_2X12_LE; in tfp410_parse_timings()
275 dvi->bus_format = MEDIA_BUS_FMT_RGB888_1X24; in tfp410_parse_timings()
282 of_property_read_u32(dvi->dev->of_node, "ti,deskew", &deskew); in tfp410_parse_timings()
295 struct tfp410 *dvi; in tfp410_init() local
303 dvi = devm_kzalloc(dev, sizeof(*dvi), GFP_KERNEL); in tfp410_init()
304 if (!dvi) in tfp410_init()
307 dvi->dev = dev; in tfp410_init()
308 dev_set_drvdata(dev, dvi); in tfp410_init()
310 dvi->bridge.funcs = &tfp410_bridge_funcs; in tfp410_init()
311 dvi->bridge.of_node = dev->of_node; in tfp410_init()
312 dvi->bridge.timings = &dvi->timings; in tfp410_init()
313 dvi->bridge.type = DRM_MODE_CONNECTOR_DVID; in tfp410_init()
315 ret = tfp410_parse_timings(dvi, i2c); in tfp410_init()
324 dvi->next_bridge = of_drm_find_bridge(node); in tfp410_init()
327 if (!dvi->next_bridge) in tfp410_init()
331 dvi->powerdown = devm_gpiod_get_optional(dev, "powerdown", in tfp410_init()
333 if (IS_ERR(dvi->powerdown)) { in tfp410_init()
335 return PTR_ERR(dvi->powerdown); in tfp410_init()
339 drm_bridge_add(&dvi->bridge); in tfp410_init()
346 struct tfp410 *dvi = dev_get_drvdata(dev); in tfp410_fini() local
348 drm_bridge_remove(&dvi->bridge); in tfp410_fini()