Lines Matching full:dvi

52 	struct tfp410 *dvi = drm_connector_to_tfp410(connector);  in tfp410_get_modes()  local
56 if (dvi->next_bridge->ops & DRM_BRIDGE_OP_EDID) { in tfp410_get_modes()
57 drm_edid = drm_bridge_edid_read(dvi->next_bridge, connector); in tfp410_get_modes()
90 struct tfp410 *dvi = drm_connector_to_tfp410(connector); in tfp410_connector_detect() local
92 return drm_bridge_detect(dvi->next_bridge); in tfp410_connector_detect()
106 struct tfp410 *dvi; in tfp410_hpd_work_func() local
108 dvi = container_of(work, struct tfp410, hpd_work.work); in tfp410_hpd_work_func()
110 if (dvi->bridge.dev) in tfp410_hpd_work_func()
111 drm_helper_hpd_irq_event(dvi->bridge.dev); in tfp410_hpd_work_func()
116 struct tfp410 *dvi = arg; in tfp410_hpd_callback() local
118 mod_delayed_work(system_wq, &dvi->hpd_work, in tfp410_hpd_callback()
125 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_attach() local
128 ret = drm_bridge_attach(bridge->encoder, dvi->next_bridge, bridge, in tfp410_attach()
136 if (dvi->next_bridge->ops & DRM_BRIDGE_OP_DETECT) in tfp410_attach()
137 dvi->connector.polled = DRM_CONNECTOR_POLL_HPD; in tfp410_attach()
139 dvi->connector.polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT; in tfp410_attach()
141 if (dvi->next_bridge->ops & DRM_BRIDGE_OP_HPD) { in tfp410_attach()
142 INIT_DELAYED_WORK(&dvi->hpd_work, tfp410_hpd_work_func); in tfp410_attach()
143 drm_bridge_hpd_enable(dvi->next_bridge, tfp410_hpd_callback, in tfp410_attach()
144 dvi); in tfp410_attach()
147 drm_connector_helper_add(&dvi->connector, in tfp410_attach()
149 ret = drm_connector_init_with_ddc(bridge->dev, &dvi->connector, in tfp410_attach()
151 dvi->next_bridge->type, in tfp410_attach()
152 dvi->next_bridge->ddc); in tfp410_attach()
154 dev_err(dvi->dev, "drm_connector_init_with_ddc() failed: %d\n", in tfp410_attach()
159 drm_display_info_set_bus_formats(&dvi->connector.display_info, in tfp410_attach()
160 &dvi->bus_format, 1); in tfp410_attach()
162 drm_connector_attach_encoder(&dvi->connector, bridge->encoder); in tfp410_attach()
169 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_detach() local
171 if (dvi->connector.dev && dvi->next_bridge->ops & DRM_BRIDGE_OP_HPD) { in tfp410_detach()
172 drm_bridge_hpd_disable(dvi->next_bridge); in tfp410_detach()
173 cancel_delayed_work_sync(&dvi->hpd_work); in tfp410_detach()
179 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_enable() local
181 gpiod_set_value_cansleep(dvi->powerdown, 0); in tfp410_enable()
186 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_disable() local
188 gpiod_set_value_cansleep(dvi->powerdown, 1); in tfp410_disable()
211 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_get_input_bus_fmts() local
221 input_fmts[0] = dvi->bus_format; in tfp410_get_input_bus_fmts()
231 struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); in tfp410_atomic_check() local
237 bridge_state->input_bus_cfg.flags = dvi->timings.input_bus_flags; in tfp410_atomic_check()
262 static int tfp410_parse_timings(struct tfp410 *dvi, bool i2c) in tfp410_parse_timings() argument
264 struct drm_bridge_timings *timings = &dvi->timings; in tfp410_parse_timings()
286 ep = of_graph_get_endpoint_by_regs(dvi->dev->of_node, 0, 0); in tfp410_parse_timings()
312 dvi->bus_format = MEDIA_BUS_FMT_RGB888_2X12_LE; in tfp410_parse_timings()
315 dvi->bus_format = MEDIA_BUS_FMT_RGB888_1X24; in tfp410_parse_timings()
322 of_property_read_u32(dvi->dev->of_node, "ti,deskew", &deskew); in tfp410_parse_timings()
335 struct tfp410 *dvi; in tfp410_init() local
343 dvi = devm_kzalloc(dev, sizeof(*dvi), GFP_KERNEL); in tfp410_init()
344 if (!dvi) in tfp410_init()
347 dvi->dev = dev; in tfp410_init()
348 dev_set_drvdata(dev, dvi); in tfp410_init()
350 dvi->bridge.funcs = &tfp410_bridge_funcs; in tfp410_init()
351 dvi->bridge.of_node = dev->of_node; in tfp410_init()
352 dvi->bridge.timings = &dvi->timings; in tfp410_init()
353 dvi->bridge.type = DRM_MODE_CONNECTOR_DVID; in tfp410_init()
355 ret = tfp410_parse_timings(dvi, i2c); in tfp410_init()
364 dvi->next_bridge = of_drm_find_bridge(node); in tfp410_init()
367 if (!dvi->next_bridge) in tfp410_init()
371 dvi->powerdown = devm_gpiod_get_optional(dev, "powerdown", in tfp410_init()
373 if (IS_ERR(dvi->powerdown)) { in tfp410_init()
375 return PTR_ERR(dvi->powerdown); in tfp410_init()
379 drm_bridge_add(&dvi->bridge); in tfp410_init()
386 struct tfp410 *dvi = dev_get_drvdata(dev); in tfp410_fini() local
388 drm_bridge_remove(&dvi->bridge); in tfp410_fini()
499 MODULE_DESCRIPTION("TI TFP410 DVI bridge driver");