encoder->possible_crtcs =
sun8i_dw_hdmi_find_possible_crtcs(drm, dev->of_node); /* * If we failed to find the CRTC(s) which this encoder is * supposed to be connected to, it's because the CRTC has * not been registered yet. Defer probing, and hope that * the required CRTC is added later.
*/ if (encoder->possible_crtcs == 0) return -EPROBE_DEFER;
hdmi->rst_ctrl = devm_reset_control_get(dev, "ctrl"); if (IS_ERR(hdmi->rst_ctrl)) return dev_err_probe(dev, PTR_ERR(hdmi->rst_ctrl), "Could not get ctrl reset control\n");
hdmi->clk_tmds = devm_clk_get(dev, "tmds"); if (IS_ERR(hdmi->clk_tmds)) return dev_err_probe(dev, PTR_ERR(hdmi->clk_tmds), "Couldn't get the tmds clock\n");
hdmi->regulator = devm_regulator_get(dev, "hvcc"); if (IS_ERR(hdmi->regulator)) return dev_err_probe(dev, PTR_ERR(hdmi->regulator), "Couldn't get regulator\n");
ret = regulator_enable(hdmi->regulator); if (ret) {
dev_err(dev, "Failed to enable regulator\n"); return ret;
}
ret = reset_control_deassert(hdmi->rst_ctrl); if (ret) {
dev_err(dev, "Could not deassert ctrl reset control\n"); goto err_disable_regulator;
}
ret = clk_prepare_enable(hdmi->clk_tmds); if (ret) {
dev_err(dev, "Could not enable tmds clock\n"); goto err_assert_ctrl_reset;
}
phy_node = of_parse_phandle(dev->of_node, "phys", 0); if (!phy_node) {
dev_err(dev, "Can't found PHY phandle\n");
ret = -EINVAL; goto err_disable_clk_tmds;
}
ret = sun8i_hdmi_phy_get(hdmi, phy_node);
of_node_put(phy_node); if (ret) {
dev_err(dev, "Couldn't get the HDMI PHY\n"); goto err_disable_clk_tmds;
}
ret = sun8i_hdmi_phy_init(hdmi->phy); if (ret) goto err_disable_clk_tmds;
/* * If dw_hdmi_bind() fails we'll never call dw_hdmi_unbind(), * which would have called the encoder cleanup. Do it manually.
*/ if (IS_ERR(hdmi->hdmi)) {
ret = PTR_ERR(hdmi->hdmi); goto cleanup_encoder;
}
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.