Lines Matching full:output

19 	struct tegra_output *output = connector_to_output(connector);  in tegra_output_connector_get_modes()  local
27 if (output->panel) { in tegra_output_connector_get_modes()
28 err = drm_panel_get_modes(output->panel, connector); in tegra_output_connector_get_modes()
33 if (output->edid) in tegra_output_connector_get_modes()
34 edid = kmemdup(output->edid, sizeof(*edid), GFP_KERNEL); in tegra_output_connector_get_modes()
35 else if (output->ddc) in tegra_output_connector_get_modes()
36 edid = drm_get_edid(connector, output->ddc); in tegra_output_connector_get_modes()
38 cec_notifier_set_phys_addr_from_edid(output->cec, edid); in tegra_output_connector_get_modes()
52 struct tegra_output *output = connector_to_output(connector); in tegra_output_connector_detect() local
55 if (output->hpd_gpio) { in tegra_output_connector_detect()
56 if (gpiod_get_value(output->hpd_gpio) == 0) in tegra_output_connector_detect()
61 if (!output->panel) in tegra_output_connector_detect()
68 cec_notifier_phys_addr_invalidate(output->cec); in tegra_output_connector_detect()
75 struct tegra_output *output = connector_to_output(connector); in tegra_output_connector_destroy() local
77 if (output->cec) in tegra_output_connector_destroy()
78 cec_notifier_conn_unregister(output->cec); in tegra_output_connector_destroy()
86 struct tegra_output *output = data; in hpd_irq() local
88 if (output->connector.dev) in hpd_irq()
89 drm_helper_hpd_irq_event(output->connector.dev); in hpd_irq()
94 int tegra_output_probe(struct tegra_output *output) in tegra_output_probe() argument
100 if (!output->of_node) in tegra_output_probe()
101 output->of_node = output->dev->of_node; in tegra_output_probe()
103 err = drm_of_find_panel_or_bridge(output->of_node, -1, -1, in tegra_output_probe()
104 &output->panel, &output->bridge); in tegra_output_probe()
108 panel = of_parse_phandle(output->of_node, "nvidia,panel", 0); in tegra_output_probe()
114 WARN_ON(output->panel || output->bridge); in tegra_output_probe()
116 output->panel = of_drm_find_panel(panel); in tegra_output_probe()
119 if (IS_ERR(output->panel)) in tegra_output_probe()
120 return PTR_ERR(output->panel); in tegra_output_probe()
123 output->edid = of_get_property(output->of_node, "nvidia,edid", &size); in tegra_output_probe()
125 ddc = of_parse_phandle(output->of_node, "nvidia,ddc-i2c-bus", 0); in tegra_output_probe()
127 output->ddc = of_get_i2c_adapter_by_node(ddc); in tegra_output_probe()
130 if (!output->ddc) { in tegra_output_probe()
136 output->hpd_gpio = devm_gpiod_get_from_of_node(output->dev, in tegra_output_probe()
137 output->of_node, in tegra_output_probe()
141 if (IS_ERR(output->hpd_gpio)) { in tegra_output_probe()
142 if (PTR_ERR(output->hpd_gpio) != -ENOENT) in tegra_output_probe()
143 return PTR_ERR(output->hpd_gpio); in tegra_output_probe()
145 output->hpd_gpio = NULL; in tegra_output_probe()
148 if (output->hpd_gpio) { in tegra_output_probe()
149 err = gpiod_to_irq(output->hpd_gpio); in tegra_output_probe()
151 dev_err(output->dev, "gpiod_to_irq(): %d\n", err); in tegra_output_probe()
155 output->hpd_irq = err; in tegra_output_probe()
160 err = request_threaded_irq(output->hpd_irq, NULL, hpd_irq, in tegra_output_probe()
161 flags, "hpd", output); in tegra_output_probe()
163 dev_err(output->dev, "failed to request IRQ#%u: %d\n", in tegra_output_probe()
164 output->hpd_irq, err); in tegra_output_probe()
168 output->connector.polled = DRM_CONNECTOR_POLL_HPD; in tegra_output_probe()
175 disable_irq(output->hpd_irq); in tegra_output_probe()
181 void tegra_output_remove(struct tegra_output *output) in tegra_output_remove() argument
183 if (output->hpd_gpio) in tegra_output_remove()
184 free_irq(output->hpd_irq, output); in tegra_output_remove()
186 if (output->ddc) in tegra_output_remove()
187 i2c_put_adapter(output->ddc); in tegra_output_remove()
190 int tegra_output_init(struct drm_device *drm, struct tegra_output *output) in tegra_output_init() argument
198 if (output->hpd_gpio) in tegra_output_init()
199 enable_irq(output->hpd_irq); in tegra_output_init()
201 connector_type = output->connector.connector_type; in tegra_output_init()
209 cec_fill_conn_info_from_drm(&conn_info, &output->connector); in tegra_output_init()
210 output->cec = cec_notifier_conn_register(output->dev, NULL, in tegra_output_init()
212 if (!output->cec) in tegra_output_init()
219 void tegra_output_exit(struct tegra_output *output) in tegra_output_exit() argument
225 if (output->hpd_gpio) in tegra_output_exit()
226 disable_irq(output->hpd_irq); in tegra_output_exit()
229 void tegra_output_find_possible_crtcs(struct tegra_output *output, in tegra_output_find_possible_crtcs() argument
232 struct device *dev = output->dev; in tegra_output_find_possible_crtcs()
244 dev_warn(dev, "missing output definition for heads in DT\n"); in tegra_output_find_possible_crtcs()
248 output->encoder.possible_crtcs = mask; in tegra_output_find_possible_crtcs()
251 int tegra_output_suspend(struct tegra_output *output) in tegra_output_suspend() argument
253 if (output->hpd_irq) in tegra_output_suspend()
254 disable_irq(output->hpd_irq); in tegra_output_suspend()
259 int tegra_output_resume(struct tegra_output *output) in tegra_output_resume() argument
261 if (output->hpd_irq) in tegra_output_resume()
262 enable_irq(output->hpd_irq); in tegra_output_resume()