int tegra_output_connector_get_modes(struct drm_connector *connector)
{ struct tegra_output *output = connector_to_output(connector); conststruct drm_edid *drm_edid = NULL; int err = 0;
/* * If the panel provides one or more modes, use them exclusively and * ignore any other means of obtaining a mode.
*/ if (output->panel) {
err = drm_panel_get_modes(output->panel, connector); if (err > 0) return err;
}
if (output->hpd_gpio) { if (gpiod_get_value(output->hpd_gpio) == 0)
status = connector_status_disconnected; else
status = connector_status_connected;
} else { if (!output->panel)
status = connector_status_disconnected; else
status = connector_status_connected;
}
if (status != connector_status_connected)
cec_notifier_phys_addr_invalidate(output->cec);
panel = of_parse_phandle(output->of_node, "nvidia,panel", 0); if (panel) { /* * Don't mix nvidia,panel phandle with the graph in a * device-tree.
*/
WARN_ON(output->panel || output->bridge);
/* * Disable the interrupt until the connector has been * initialized to avoid a race in the hotplug interrupt * handler.
*/
disable_irq(output->hpd_irq);
}
return 0;
put_i2c: if (output->ddc)
i2c_put_adapter(output->ddc);
drm_edid_free(output->drm_edid);
return err;
}
void tegra_output_remove(struct tegra_output *output)
{ if (output->hpd_gpio)
free_irq(output->hpd_irq, output);
if (output->ddc)
i2c_put_adapter(output->ddc);
drm_edid_free(output->drm_edid);
}
int tegra_output_init(struct drm_device *drm, struct tegra_output *output)
{ int connector_type;
/* * The connector is now registered and ready to receive hotplug events * so the hotplug interrupt can be enabled.
*/ if (output->hpd_gpio)
enable_irq(output->hpd_irq);
connector_type = output->connector.connector_type; /* * Create a CEC notifier for HDMI connector.
*/ if (connector_type == DRM_MODE_CONNECTOR_HDMIA ||
connector_type == DRM_MODE_CONNECTOR_HDMIB) { struct cec_connector_info conn_info;
void tegra_output_exit(struct tegra_output *output)
{ /* * The connector is going away, so the interrupt must be disabled to * prevent the hotplug interrupt handler from potentially crashing.
*/ if (output->hpd_gpio)
disable_irq(output->hpd_irq);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.