ret = check_phy_reg(display, phy, ICL_PORT_COMP_DW1(phy),
(0xff << 16) | 0xff, procmon->dw1);
ret &= check_phy_reg(display, phy, ICL_PORT_COMP_DW9(phy),
-1U, procmon->dw9);
ret &= check_phy_reg(display, phy, ICL_PORT_COMP_DW10(phy),
-1U, procmon->dw10);
return ret;
}
staticbool has_phy_misc(struct intel_display *display, enum phy phy)
{ /* * Some platforms only expect PHY_MISC to be programmed for PHY-A and * PHY-B and may not even have instances of the register for the * other combo PHY's. * * ADL-S technically has three instances of PHY_MISC, but only requires * that we program it for PHY A.
*/
/* * VBT's 'dvo port' field for child devices references the DDI, not * the PHY. So if combo PHY A is wired up to drive an external * display, we should see a child device present on PORT_D and * nothing on PORT_A and no DSI.
*/ if (ddi_d_present && !ddi_a_present && !dsi_present) returntrue;
/* * If we encounter a VBT that claims to have an external display on * DDI-D _and_ an internal display on DDI-A/DSI leave an error message * in the log and let the internal display win.
*/ if (ddi_d_present)
drm_err(display->drm, "VBT claims to have both internal and external displays on PHY A. Configuring for internal.\n");
returnfalse;
}
staticbool phy_is_master(struct intel_display *display, enum phy phy)
{ /* * Certain PHYs are connected to compensation resistors and act * as masters to other PHYs. * * ICL,TGL: * A(master) -> B(slave), C(slave) * RKL,DG1: * A(master) -> B(slave) * C(master) -> D(slave) * ADL-S: * A(master) -> B(slave), C(slave) * D(master) -> E(slave) * * We must set the IREFGEN bit for any PHY acting as a master * to another PHY.
*/ if (phy == PHY_A) returntrue; elseif (display->platform.alderlake_s) return phy == PHY_D; elseif (display->platform.dg1 || display->platform.rocketlake) return phy == PHY_C;
if (!has_phy_misc(display, phy)) goto skip_phy_misc;
/* * EHL's combo PHY A can be hooked up to either an external * display (via DDI-D) or an internal display (via DDI-A or * the DSI DPHY). This is a motherboard design decision that * can't be changed on the fly, so initialize the PHY's mux * based on whether our VBT indicates the presence of any * "internal" child devices.
*/
val = intel_de_read(display, ICL_PHY_MISC(phy)); if ((display->platform.jasperlake || display->platform.elkhartlake) &&
phy == PHY_A) {
val &= ~ICL_PHY_MISC_MUX_DDID;
if (ehl_vbt_ddi_d_present(display))
val |= ICL_PHY_MISC_MUX_DDID;
}
val &= ~ICL_PHY_MISC_DE_IO_COMP_PWR_DOWN;
intel_de_write(display, ICL_PHY_MISC(phy), val);
skip_phy_misc: if (DISPLAY_VER(display) >= 12) {
val = intel_de_read(display, ICL_PORT_TX_DW8_LN(0, phy));
val &= ~ICL_PORT_TX_DW8_ODCC_CLK_DIV_SEL_MASK;
val |= ICL_PORT_TX_DW8_ODCC_CLK_SEL;
val |= ICL_PORT_TX_DW8_ODCC_CLK_DIV_SEL_DIV2;
intel_de_write(display, ICL_PORT_TX_DW8_GRP(phy), val);
val = intel_de_read(display, ICL_PORT_PCS_DW1_LN(0, phy));
val &= ~DCC_MODE_SELECT_MASK;
val |= RUN_DCC_ONCE;
intel_de_write(display, ICL_PORT_PCS_DW1_GRP(phy), val);
}
icl_set_procmon_ref_values(display, phy);
if (phy_is_master(display, phy))
intel_de_rmw(display, ICL_PORT_COMP_DW8(phy), 0, IREFGEN);
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.